Skip to content

Commit

Permalink
Adapt to nonzero 0d deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
thangleiter committed Oct 24, 2024
1 parent c87a7b6 commit f9f0adf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion filter_functions/basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def istraceless(self) -> bool:
if self._istraceless is None:
trace = np.einsum('...jj', self)
trace = util.remove_float_errors(trace, self.d**2)
nonzero = trace.nonzero()
nonzero = np.atleast_1d(trace).nonzero()
if nonzero[0].size == 0:
self._istraceless = True
elif nonzero[0].size == 1:
Expand Down
1 change: 0 additions & 1 deletion tests/test_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import numpy as np
import pytest
from filter_functions import util
from scipy import stats, linalg
from sparse import COO
from tests import testutil
from tests.testutil import rng
Expand Down

0 comments on commit f9f0adf

Please sign in to comment.