From ddc77b53e69994903c931a0aba7cbdfb63625a31 Mon Sep 17 00:00:00 2001 From: Rowan Cockett Date: Fri, 7 Nov 2014 13:35:33 -0700 Subject: [PATCH] minor bugs in weighting maps --- SimPEG/Maps.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SimPEG/Maps.py b/SimPEG/Maps.py index 699d7c26..ebe51cf6 100644 --- a/SimPEG/Maps.py +++ b/SimPEG/Maps.py @@ -436,11 +436,11 @@ class Weighting(IdentityMap): self.nC = nC or mesh.nC if weights is None: - weights = np.ones(nC) + weights = np.ones(self.nC) - weights = np.array(weights, dtype=float) + self.weights = np.array(weights, dtype=float) - self.P = Utils.sdiag(weights) + self.P = Utils.sdiag(self.weights) @property def shape(self): @@ -455,7 +455,7 @@ class Weighting(IdentityMap): return self.P*m def inverse(self, D): - Pinv = Utils.sdiag(weights**(-1.)) + Pinv = Utils.sdiag(self.weights**(-1.)) return Pinv*D def deriv(self, m):