cf.RegridOperator.tosparse¶
-
RegridOperator.tosparse()[source]¶ Convert the weights to
scipysparse array format in-place.The weights are converted to Compressed Sparse Row(CSR) array format, i.e. the
weightsattribute becomes ascipy.sparse._arrays.csr_arrayobject. A CSR array used as the most efficient sparse array type given that we expect no changes to the sparsity structure, and any further modification of the weights to account for missing values in the source grid will always involve row-slicing.The
dst_maskattribute is updated toTruefor destination grid points for which the weights are all zero.- Returns