{ } Raw JSON

bundles / scipy latest / scipy / io / _fast_matrix_market / _apply_field

function

scipy.io._fast_matrix_market:_apply_field

source: /scipy/io/_fast_matrix_market/__init__.py :247

Signature

def   _apply_field ( data field no_pattern = False )

Summary

Ensure that data.dtype is compatible with the specified MatrixMarket field type.

Parameters

data : ndarray

Input array.

field : str

Matrix Market field, such as 'real', 'complex', 'integer', 'pattern'.

no_pattern : bool, optional

Whether an empty array may be returned for a 'pattern' field.

Returns

data : ndarray

Input data if no conversion necessary, or a converted version

Aliases

  • scipy.io._fast_matrix_market._apply_field