Mentions légales du service

Skip to content
Snippets Groups Projects

python: simplify return type of genRHS vectors

Merged BREGEOT Valentine requested to merge python/genRHS2 into master
1 file
+ 8
3
Compare changes
  • Side-by-side
  • Inline
@@ -242,13 +242,18 @@ class spmatrix():
# raise EnvironmentError( "SPM Instance badly instanciated" )
n = self.spm_c.n
b = np.zeros((n, nrhs), self.dtype)
if nrhs == 1:
b = np.zeros((n), self.dtype )
else:
b = np.zeros((n, nrhs), self.dtype)
ldb = b.shape[0]
self.__checkVector( n, nrhs, b )
if getx:
x = np.zeros((n, nrhs), self.dtype)
if nrhs == 1:
x = np.zeros((n), self.dtype)
else:
x = np.zeros((n, nrhs), self.dtype)
ldx = x.shape[0]
self.__checkVector( n, nrhs, x )
xptr = x.ctypes.data_as( c_void_p )
Loading