Skip to content

Commit

Permalink
Work around numba #5929 (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjperkins authored Jul 30, 2024
1 parent 23b57b9 commit 45209f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
History
=======

0.3.7 (2024-05-23)
X.Y.Z (YYYY-MM-DD)
------------------
* Workaround numba #5929 (:pr:`312`)
* Restrict NumPy to less than 2.0.0 (:pr:`313`)

0.3.7 (2024-05-23)
------------------
* Fix bda overload to return an implementation (:pr:`307`)
* Upgrade obsolete readthedocs configuration (:pr:`304`)

Expand Down
4 changes: 3 additions & 1 deletion africanus/averaging/tests/test_time_and_channel_averaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,9 @@ def test_averager(
assert avg.weight_spectrum.shape == chan_avg_shape
assert avg.sigma_spectrum.shape == chan_avg_shape

chan_ranges = np.nonzero(np.ediff1d(chan_map, to_begin=1, to_end=1))[0]
# https://github.com/numba/numba/issues/5929
one = np.array(1, dtype=chan_map.dtype)
chan_ranges = np.nonzero(np.ediff1d(chan_map, to_begin=one, to_end=one))[0]

# Three python loops. Slow, but works...
# Figure out some way to remove loops with numpy
Expand Down

0 comments on commit 45209f0

Please sign in to comment.