Skip to content

Commit 3db1d87

Browse files
committed
Fix indexing for out of bound only
(cherry picked from commit 1946eb5)
1 parent f72a136 commit 3db1d87

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

simpeg/directives/_vector_models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ def endIter(self):
143143
if np.any(out_bound):
144144
scale = upper_bound / amplitude
145145
for ind in indices:
146-
model[ind] *= scale
146+
vec = model[ind]
147+
vec[out_bound] *= scale[out_bound]
148+
model[ind] = vec
147149

148150
self.invProb.model = model
149151
self.opt.xc = model

0 commit comments

Comments
 (0)