COO.linear_loc¶

COO.linear_loc()[source]

The nonzero coordinates of a flattened version of this array. Note that the coordinates may be out of order.

Parameters: signed (bool, optional) – Whether to use a signed datatype for the output array. False by default. The flattened coordinates. numpy.ndarray

numpy.flatnonzero
>>> x = np.eye(5)