{ } Raw JSON

bundles / scipy 1.17.1 / scipy / _lib / _util / _asarray_validated

function

scipy._lib._util:_asarray_validated

source: /scipy/_lib/_util.py :423

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_like

The array-like input.

check_finite : bool, optional

Whether 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, optional

True if scipy sparse matrices are allowed.

objects_ok : bool, optional

True if arrays with dype('O') are allowed.

mask_ok : bool, optional

True if masked arrays are allowed.

as_inexact : bool, optional

True to convert the input array to a np.inexact dtype.

Returns

ret : ndarray

The converted validated array.

Aliases

  • scipy.interpolate._polyint._asarray_validated