10000 BUG: Bump Highway to latest master (#27070) · charris/numpy@86ac47d · GitHub
[go: up one dir, main page]

Skip to content

Commit 86ac47d

Browse files
Mousiuscharris
authored andcommitted
BUG: Bump Highway to latest master (numpy#27070)
* Bump Highway to latest master Fixes numpy#27037 * Add reproducer
1 parent 432f8cf commit 86ac47d

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

numpy/_core/src/highway

Submodule highway updated 95 files

numpy/_core/tests/test_regression.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2620,3 +2620,25 @@ def test_vectorize_fixed_width_string(self):
26202620
f = str.casefold
26212621
res = np.vectorize(f, otypes=[arr.dtype])(arr)
26222622
assert res.dtype == "U30"
2623+
2624+
def test_repeated_square_consistency(self):
2625+
# gh-26940
2626+
buf = np.array([-5.171866611150749e-07 + 2.5618634555957426e-07j,
2627+
0, 0, 0, 0, 0])
2628+
# Test buffer with regular and reverse strides
2629+
for in_vec in [buf[:3], buf[:3][::-1]]:
2630+
expected_res = np.square(in_vec)
2631+
# Output vector immediately follows input vector
2632+
# to reproduce off-by-one in nomemoverlap check.
2633+
for res in [buf[3:], buf[3:][::-1]]:
2634+
res = buf[3:]
2635+
np.square(in_vec, out=res)
2636+
assert_equal(res, expected_res)
2637+
2638+
def test_sort_unique_crash(self):
2639+
# gh-27037
2640+
for _ in range(4):
2641+
vals = np.linspace(0, 1, num=128)
2642+
data = np.broadcast_to(vals, (128, 128, 128))
2643+
data = data.transpose(0, 2, 1).copy()
2644+
np.unique(data)

0 commit comments

Comments
 (0)
0