()
| 130 | |
| 131 | @sizeof.register_lazy("numpy") |
| 132 | def 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") |
nothing calls this directly
no outgoing calls
no test coverage detected