out = np.zeros(len(mat.indptr) - 1, dtype=self.dtype)
out[major_index] = value
out = np.asmatrix(out)
if axis == 1:
out = out.T
return self.__class__(out)
def _min_or_max(self, axis, min_or_max):
if axis is None:
After Change
not_full = np.diff(mat.indptr)[major_index] < N
value[not_full] = min_or_max(value[not_full], 0)
mask = value != 0
major_index = np.compress(mask, major_index)
value = np.compress(mask, value)
from . import coo_matrix
if axis == 0: