From 7b238cabaf116dad5241d3a5c5880cfd35f189ed Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Mon, 17 Aug 2026 12:07:52 +0200 Subject: [PATCH] Skip einsum test_out_0d for NumPy older than 2.4.5 The reference numpy.einsum call with a 0-d out array and optimize="optimal" only behaves as expected starting with NumPy 2.4.5, so guard test_out_0d with the corresponding version requirement. --- dpnp/tests/test_linalg.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dpnp/tests/test_linalg.py b/dpnp/tests/test_linalg.py index fbd21f9d41f..1aa3781dcf6 100644 --- a/dpnp/tests/test_linalg.py +++ b/dpnp/tests/test_linalg.py @@ -601,6 +601,7 @@ def test_out(self): expected = numpy.einsum("ii->i", a.asnumpy()) assert_dtype_allclose(result, expected) + @testing.with_requires("numpy>=2.4.5") def test_out_0d(self): a = numpy.ones(7, dtype=int) out = numpy.array(0, dtype=a.dtype)