-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
44 lines (42 loc) · 1.44 KB
/
__init__.py
File metadata and controls
44 lines (42 loc) · 1.44 KB
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
"""
genutil -- General utility modules for scientific computing
"""
# Lean mode does not install xmgrace module
from .grower import grower # noqa
try:
import xmgrace # noqa
except BaseException:
pass
from .minmax import minmax # noqa
from .statusbar import statusbar # noqa
from .selval import picker # noqa
from . import filters # noqa
from . import arrayindexing # noqa
from . import statistics # noqa
from . import ASCII # noqa
from . import udunits # noqa
from .Filler import Filler, StringConstructor # noqa
from .averager import averager, AveragerError, area_weights, getAxisWeight, getAxisWeightByName, __check_weightoptions # noqa
from .ASCII import get_parenthesis_content # noqa
import os # noqa
import sys # noqa
import cdat_info
from .stats_checker import StatisticsError # noqa
# udunits bits
from .udunits import udunits, addBaseUnit, addDimensionlessUnit, addScaledUnit # noqa
from .udunits import addOffsettedUnit, addMultipliedUnits, addInvertedUnit, addDividedUnits # noqa
udunits_init = 0 # noqa
xml_pth = os.path.join(sys.prefix, "share", "udunits", "udunits2.xml")
if os.path.exists(xml_pth):
os.environ["UDUNITS2_XML_PATH"] = xml_pth
else:
try:
xml_pth = os.path.join(
cdat_info.externals,
"share",
"udunits",
"udunits2.xml")
if os.path.exists(xml_pth):
os.environ["UDUNITS2_XML_PATH"] = xml_pth
except BaseException:
pass