bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / _lib / _util / _asarray_validated
function
scipy._lib._util:_asarray_validated
source: build-install/usr/lib/python3.14/site-packages/scipy/_lib/_util.py:364
Signature
def _asarray_validated(a, check_finite = True, sparse_ok = False, objects_ok = False, mask_ok = False, as_inexact = False)Summary
Helper function for SciPy argument validation.
Extended Summary
Many SciPy linear algebra functions do support arbitrary array-like input arguments. Examples of commonly unsupported inputs include matrices containing inf/nan, sparse matrix representations, and matrices with complicated elements.
Parameters
a: array_likeThe array-like input.
check_finite: bool, optionalWhether to check that the input matrices contain only finite numbers. Disabling may give a performance gain, but may result in problems (crashes, non-termination) if the inputs do contain infinities or NaNs. Default: True
sparse_ok: bool, optionalTrue if scipy sparse matrices are allowed.
objects_ok: bool, optionalTrue if arrays with dype('O') are allowed.
mask_ok: bool, optionalTrue if masked arrays are allowed.
as_inexact: bool, optionalTrue to convert the input array to a np.inexact dtype.
Returns
ret: ndarrayThe converted validated array.
Aliases
scipy.interpolate._polyint._asarray_validated