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

Function register_numpy

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

Source from the content-addressed store, hash-verified

130
131@sizeof.register_lazy("numpy")
132def register_numpy():
133 import numpy as np
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