This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

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

function

scipy.io._fast_matrix_market:_apply_field

source: build-install/usr/lib/python3.14/site-packages/scipy/io/_fast_matrix_market/__init__.py:250

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