Skip to content

Commit 74b65ee

Browse files
committed
Handle zero-dimensional arrays in eta in eval_field
1 parent a094434 commit 74b65ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

psydac/fem/tensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def eval_field( self, field, *eta, weights=None):
209209
field.coeffs.update_ghost_regions()
210210

211211
# Check if `x` is iterable and loop over elements
212-
if isinstance(eta[0], (list, np.ndarray)):
212+
if isinstance(eta[0], (list, np.ndarray)) and np.ndim(eta[0]) > 0:
213213
for dim in range(1, self.ldim):
214214
assert len(eta[0]) == len(eta[dim])
215215
res_list = []

0 commit comments

Comments
 (0)