MCPcopy Index your code
hub / github.com/numpy/numpy / _load

Method _load

numpy/lib/_datasource.py:101–126  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

99 self._file_openers = {None: open}
100
101 def _load(self):
102 if self._loaded:
103 return
104
105 try:
106 import bz2
107 self._file_openers[".bz2"] = bz2.open
108 except ImportError:
109 pass
110
111 try:
112 import gzip
113 self._file_openers[".gz"] = gzip.open
114 except ImportError:
115 pass
116
117 try:
118 import lzma
119 self._file_openers[".xz"] = lzma.open
120 self._file_openers[".lzma"] = lzma.open
121 except (ImportError, AttributeError):
122 # There are incompatible backports of lzma that do not have the
123 # lzma.open attribute, so catch that as well as ImportError.
124 pass
125
126 self._loaded = True
127
128 def keys(self):
129 """

Callers 2

keysMethod · 0.95
__getitem__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected