Skip to content

Commit

Permalink
Generalise out dimensions detection
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwoerer committed Jan 8, 2024
1 parent 8bf6e89 commit ad46e9a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xbout/fci/evaluate_at.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,12 @@ def evaluate_at_keys(ds, keys, key, fill_value=np.nan, slow=False):
except AttributeError:
pass
outd = []
havenew = False
for d in ds[k].dims:
if d == "x":
outd += weights.dims[:-3]
if d in "xyz":
if not havenew:
havenew = True
outd += weights.dims[:-3]
continue
outd.append(d)
tmp = np.einsum("...ijk,...ijk->...", theisel, weights)
Expand Down

0 comments on commit ad46e9a

Please sign in to comment.