naginterfaces.library.blas.dgthrz

naginterfaces.library.blas.dgthrz(y, indx)[source]

dgthrz gathers specified (usually nonzero) elements of a real vector in full storage form into a sparse real vector in compressed form. The specified elements of are set to zero.

For full information please refer to the NAG Library document for f06ev

https://www.nag.com/numeric/nl/nagdoc_28.7/flhtml/f06/f06evf.html

Parameters
yfloat, array-like, shape

The vector . Only elements corresponding to indices in are accessed.

indxint, array-like, shape

must contain the index , for , which is to be gathered into .

Returns
yfloat, ndarray, shape

The elements of corresponding to indices in are set to zero.

xfloat, ndarray, shape

The compressed vector .

Raises
NagValueError
(errno )

On entry, error in parameter .

Constraint: the indices must be distinct.

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

dgthrz gathers the specified elements of a vector, , in full storage form, into the equivalent sparse vector compressed form. The gathered elements of are set to zero.

References

Dodson, D S, Grimes, R G and Lewis, J G, 1991, Sparse extensions to the Fortran basic linear algebra subprograms, ACM Trans. Math. Software (17), 253–263