Beispiel #1
0
 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
Beispiel #2
0
Datei: coo.py Projekt: 87/scipy
 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
Beispiel #3
0
 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
Beispiel #4
0
Datei: coo.py Projekt: wesm/scipy
 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