SciPy

This is documentation for an old release of SciPy (version 0.19.0). Read this page in the documentation of the latest stable release (version 1.15.1).

scipy.sparse.bsr_matrix.astype

bsr_matrix.astype(t)[source]

Cast the matrix elements to a specified type.

The data will be copied.

Parameters:

t : string or numpy dtype

Typecode or data-type to which to cast the data.