bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / _lib / _array_api / _asarray
function
scipy._lib._array_api:_asarray
source: build-install/usr/lib/python3.14/site-packages/scipy/_lib/_array_api.py:80
Signature
def _asarray(array: ArrayLike, dtype: Any = None, order: Literal['K', 'A', 'C', 'F'] | None = None, copy: bool | None = None, *, xp: ModuleType | None = None, check_finite: bool = False, subok: bool = False, device: Any = None) → ArraySummary
SciPy-specific replacement for np.asarray with order, check_finite, and subok.
Extended Summary
Memory layout parameter order is not exposed in the Array API standard. order is only enforced if the input array implementation is NumPy based, otherwise order is just silently ignored.
check_finite is also not a keyword in the array API standard; included here for convenience rather than that having to be a separate function call inside SciPy functions.
subok is included to allow this function to preserve the behaviour of np.asanyarray for NumPy based inputs.
device places the result on the given device. It is ignored for NumPy based inputs, where the only device is the (default) CPU.
Aliases
scipy.constants._constants._asarray