/
optional_dependencies.py
54 lines (42 loc) · 1.28 KB
/
optional_dependencies.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
def require_pandas():
try:
import pandas as pd
except ImportError:
raise ImportError("The pandas library is required to use this function.")
return pd
def require_pooch():
try:
import pooch
except ImportError:
raise ImportError("The pooch library is required to use this function.")
return pooch
def require_gempy_legacy():
try:
import gempy_legacy
except ImportError:
raise ImportError("The gempy_legacy library is required to use this function.")
return gempy_legacy
def require_gempy_viewer():
try:
import gempy_viewer
except ImportError:
raise ImportError("The gempy_viewer package is required to run this function.")
return gempy_viewer
def require_skimage():
try:
import skimage
except ImportError:
raise ImportError("The skimage package is required to run this function.")
return skimage
def require_scipy():
try:
import scipy
except ImportError:
raise ImportError("The scipy package is required to run this function.")
return scipy
def require_subsurface():
try:
import subsurface
except ImportError:
raise ImportError("The subsurface package is required to run this function.")
return subsurface