Numpy

Interface to numpy arrays

class NumpyInterface(shape: Tuple[int, ...] | Any, dtype: str | type | Any | generic)[source]

Numpy ndarray s!

return_type

alias of ndarray

priority: int = -999

The numpy interface is usually the interface of last resort. We want to use any more specific interface that we might have, because the numpy interface checks for anything that could be coerced to a numpy array (see NumpyInterface.check() )

classmethod check(array: Any) bool[source]

Check that this is in fact a numpy ndarray or something that can be coerced to one

before_validation(array: Any) ndarray[source]

Coerce to an ndarray. We have already checked if coercion is possible in check()

classmethod enabled() bool[source]

Check that numpy is present in the environment