(x, axis=None)
return _apply_func(x, np.nansum, nansum_sparse, axis=axis)
Equivalent of np.nansum that supports sparse or dense matrices.
Equivalent of np.nansum that supports sparse or dense matrices.
Equivalent of np . nansum that supports sparse or dense matrices .
def nansum(x, axis=None):
    """ Equivalent of np.nansum that supports sparse or dense matrices. """
    def nansum_sparse(x):
        return np.nansum(x.data)

    return _apply_func(x, np.nansum, nansum_sparse, axis=axis)
def nansum ( x , axis = None ) : def nansum_sparse ( x ) : return np . nansum ( x . data ) return _apply_func ( x , np . nansum , nansum_sparse , axis = axis )