Skip to content

Commit

Permalink
Address numpy deprecations (#1041)
Browse files Browse the repository at this point in the history
silence deprecation warning by numpy
  • Loading branch information
PhilipVinc committed Dec 19, 2021
1 parent c61ea54 commit fd39503
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions netket/operator/_local_operator.py
Expand Up @@ -158,7 +158,7 @@ def _reorder_kronecker_product(hi, mat, acting_on):
state_to_number to perform the re-ordering.
"""
acting_on_sorted = np.sort(acting_on)
if np.all(acting_on_sorted == acting_on):
if np.array_equal(acting_on_sorted, acting_on):
return mat, acting_on

# could write custom binary <-> int logic instead of using Fock...
Expand Down Expand Up @@ -546,7 +546,7 @@ def _add_operator(self, operator: Array, acting_on: List[int]):
# find overlapping support
support_i = None
for (i, support) in enumerate(self._acting_on_list()):
if np.all(acting_on == support):
if np.array_equal(acting_on, support):
support_i = i
break

Expand Down

0 comments on commit fd39503

Please sign in to comment.