mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-18 12:40:30 +08:00
return a scipy sparse matrix for the deriv (a bit silly - it is dense, but nicer for multiplication). Init Regularization with a nP
This commit is contained in:
+3
-3
@@ -19,7 +19,7 @@ class IdentityMap(object):
|
||||
Utils.setKwargs(self, **kwargs)
|
||||
|
||||
if nP is not None:
|
||||
assert type(nP) in [int, long], ' Number of parameters must be an integer.'
|
||||
assert type(nP) in [int, long, np.int64], ' Number of parameters must be an integer.'
|
||||
|
||||
self.mesh = mesh
|
||||
self._nP = nP
|
||||
@@ -1492,7 +1492,7 @@ class ParametrizedBlockInLayer(IdentityMap):
|
||||
self._validate_m(m) # make sure things are the right sizes
|
||||
|
||||
if self.mesh.dim == 2:
|
||||
return self._deriv2d(m)
|
||||
return sp.csr_matrix(self._deriv2d(m))
|
||||
elif self.mesh.dim == 3:
|
||||
return self._deriv3d(m)
|
||||
return sp.csr_matrix(self._deriv3d(m))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user