MCPcopy Index your code
hub / github.com/PyTables/PyTables / _getemptyarray

Method _getemptyarray

tables/table.py:1002–1009  ·  view source on GitHub ↗
(self, dtype: np.dtype)

Source from the content-addressed store, hash-verified

1000 return nrowsinbuf
1001
1002 def _getemptyarray(self, dtype: np.dtype) -> np.ndarray:
1003 # Acts as a cache for empty arrays
1004 key = dtype
1005 if key in self._empty_array_cache:
1006 return self._empty_array_cache[key]
1007 else:
1008 self._empty_array_cache[key] = arr = np.empty(shape=0, dtype=key)
1009 return arr
1010
1011 def _get_container(self, shape: int) -> np.ndarray:
1012 """Get the appropriate buffer for data depending on table nestedness."""

Callers 1

_read_coordinatesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected