Skip to content

Commit

Permalink
this should work for broadcasting a single value for all current values
Browse files Browse the repository at this point in the history
  • Loading branch information
jcapriot committed Apr 29, 2022
1 parent 589295a commit d4d6522
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SimPEG/electromagnetics/static/resistivity/sources.py
Expand Up @@ -38,7 +38,7 @@ def current(self, other):
other = np.atleast_1d(np.asarray(other, dtype=float))
if other.ndim > 1:
raise ValueError("Too many dimensions for current array")
if len(other) != self.location.shape[0]:
if len(other) > 1 and len(other) != self.location.shape[0]:
raise ValueError(
"Current must be constant or equal to the number of specified source locations."
f" saw {len(other)} current sources and {self.location.shape[0]} locations."
Expand Down

0 comments on commit d4d6522

Please sign in to comment.