Skip to content

Commit

Permalink
fix(mpiarray): dictionaries have keys, not attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
anjakefala committed Feb 4, 2021
1 parent fb5c03e commit d2c1a05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions caput/mpiarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -1035,9 +1035,9 @@ def __array_ufunc__(self, ufunc, method, *inputs, **kwargs):
args.append(input_)

for mpi_array in input_mpi:
if hasattr(kwargs, "axis") and (kwargs["axis"] == mpi_array.axis):
if "axis" in kwargs and (kwargs["axis"] == distr_axis):
raise ValueError(
f"operations along the distributed axis (in this case, {mpi_array.axis}) are not allowed."
f"operations along the distributed axis (in this case, {distr_axis}) are not allowed."
)

# 'out' kwargs contain arrays that the ufunc places the results into
Expand Down

0 comments on commit d2c1a05

Please sign in to comment.