bundles / scipy 1.17.1 / scipy / sparse / linalg / _interface / LinearOperator / _init_dtype
function
scipy.sparse.linalg._interface:LinearOperator._init_dtype
Signature
def _init_dtype ( self ) Summary
Determine the dtype by executing matvec on an int8 test vector.
Extended Summary
In np.promote_types hierarchy, the type int8 is the smallest, so we call matvec on int8 and use the promoted dtype of the output to set the default dtype of the LinearOperator. We assume that matmat, rmatvec, and rmatmat would result in the same dtype of the output given an int8 input as matvec.
Called from subclasses at the end of the __init__ routine.
Aliases
-
scipy.linalg._decomp_interpolative.LinearOperator._init_dtype