From f0ec987d23fb7ccd02a61b73201e4bb14d6baa57 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Mon, 9 Nov 2020 20:45:22 +0100 Subject: [PATCH] test/coredevice: Avoid NumPy deprecation warning Jagged arrays are no longer silently inferred as dtype=object, as per NEP-34. The compiler ndarray (re)implementation is unchanged, so the test still fails. --- artiq/test/coredevice/test_embedding.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artiq/test/coredevice/test_embedding.py b/artiq/test/coredevice/test_embedding.py index d3c362344..57c2a8fab 100644 --- a/artiq/test/coredevice/test_embedding.py +++ b/artiq/test/coredevice/test_embedding.py @@ -79,11 +79,11 @@ class RoundtripTest(ExperimentCase): self.assertArrayRoundtrip(numpy.array([["a", "b"], ["c", "d"]])) # FIXME: This should work, but currently passes as the argument is just - # synthesised as the same call to array(), instead of using the "type - # inference" result from the host NumPy implementation. + # synthesised as a call to array() without forwarding the dype form the host + # NumPy object. @unittest.expectedFailure def test_array_jagged(self): - self.assertArrayRoundtrip(numpy.array([[1, 2], [3]])) + self.assertArrayRoundtrip(numpy.array([[1, 2], [3]], dtype=object)) class _DefaultArg(EnvExperiment):