MCPcopy Create free account
hub / github.com/PyTables/PyTables / conv_to_numpy

Function conv_to_numpy

tables/flavor.py:387–395  ·  view source on GitHub ↗
(array: npt.ArrayLike)

Source from the content-addressed store, hash-verified

385 """
386
387 def conv_to_numpy(array: npt.ArrayLike) -> np.ndarray:
388 nparr = convfunc(array)
389 if (
390 hasattr(nparr, "flags")
391 and not nparr.flags.contiguous
392 and sum(nparr.strides) != 0
393 ):
394 nparr = nparr.copy() # copying the array makes it contiguous
395 return nparr
396
397 conv_to_numpy.__name__ = convfunc.__name__
398 conv_to_numpy.__doc__ = convfunc.__doc__

Callers

nothing calls this directly

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected