MCPcopy Index your code
hub / github.com/numpy/numpy / test_dot_big_stride

Method test_dot_big_stride

numpy/_core/tests/test_regression.py:2488–2497  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2486 @requires_memory(free_bytes=9e9)
2487 @pytest.mark.thread_unsafe(reason="crashes with low memory")
2488 def test_dot_big_stride(self):
2489 # gh-17111
2490 # blas stride = stride//itemsize > int32 max
2491 int32_max = np.iinfo(np.int32).max
2492 n = int32_max + 3
2493 a = np.empty([n], dtype=np.float32)
2494 b = a[::n - 1]
2495 b[...] = 1
2496 assert b.strides[0] > int32_max * b.dtype.itemsize
2497 assert np.dot(b, b) == 2.0
2498
2499 def test_frompyfunc_name(self):
2500 # name conversion was failing for python 3 strings

Callers

nothing calls this directly

Calls 1

dotMethod · 0.80

Tested by

no test coverage detected