def toarray(self, order=None, out=None): """See the docstring for `spmatrix.toarray`.""" B = self._process_toarray_args(order, out) fortran = int(B.flags.f_contiguous) if not fortran and not B.flags.c_contiguous: raise ValueError("Output array must be C or F contiguous") M, N = self.shape coo_todense(M, N, self.nnz, self.row, self.col, self.data, B.ravel(order='A'), fortran) return B
def toarray(self, order=None, out=None): """See the docstring for `spmatrix.toarray`.""" B = self._process_toarray_args(order, out) fortran = int(B.flags.f_contiguous) if not fortran and not B.flags.c_contiguous: raise ValueError("Output array must be C or F contiguous") M,N = self.shape coo_todense(M, N, self.nnz, self.row, self.col, self.data, B.ravel('A'), fortran) return B
def toarray(self): B = np.zeros(self.shape, dtype=self.dtype) M,N = self.shape coo_todense(M, N, self.nnz, self.row, self.col, self.data, B.ravel()) return B
def toarray(self): B = np.zeros(self.shape, dtype=self.dtype) M, N = self.shape coo_todense(M, N, self.nnz, self.row, self.col, self.data, B.ravel()) return B