MCPcopy Create free account
hub / github.com/dask/dask / sizeof_numpy_ndarray

Function sizeof_numpy_ndarray

dask/sizeof.py:136–140  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

134
135 @sizeof.register(np.ndarray)
136 def sizeof_numpy_ndarray(x):
137 if 0 in x.strides:
138 xs = x[tuple(slice(None) if s != 0 else slice(1) for s in x.strides)]
139 return xs.nbytes
140 return int(x.nbytes)
141
142
143@sizeof.register_lazy("pandas")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected