From e82357d180582e3e392e7a009e70e361cdc49c68 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Mon, 27 Jul 2020 23:19:43 +0100 Subject: [PATCH] compiler: Fix inferencer tests after adding TArray.num_dims --- artiq/test/lit/inferencer/array.py | 8 ++++---- artiq/test/lit/inferencer/unify.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/artiq/test/lit/inferencer/array.py b/artiq/test/lit/inferencer/array.py index c4f215db8..f33040f92 100644 --- a/artiq/test/lit/inferencer/array.py +++ b/artiq/test/lit/inferencer/array.py @@ -1,13 +1,13 @@ # RUN: %python -m artiq.compiler.testbench.inferencer %s >%t # RUN: OutputCheck %s --file-to-check=%t -# CHECK-L: numpy.array(elt='a) +# CHECK-L: numpy.array(elt='a, num_dims=1) array([]) -# CHECK-L: numpy.array(elt=numpy.int?) +# CHECK-L: numpy.array(elt=numpy.int?, num_dims=1) array([1, 2, 3]) -# CHECK-L: numpy.array(elt=numpy.int?) +# CHECK-L: numpy.array(elt=numpy.int?, num_dims=2) array([[1, 2, 3], [4, 5, 6]]) -# CHECK-L: numpy.array(elt=list(elt=numpy.int?)) +# CHECK-L: numpy.array(elt=list(elt=numpy.int?), num_dims=1) array([[1, 2, 3], [4, 5]]) diff --git a/artiq/test/lit/inferencer/unify.py b/artiq/test/lit/inferencer/unify.py index e4fea57fe..8dcb1e423 100644 --- a/artiq/test/lit/inferencer/unify.py +++ b/artiq/test/lit/inferencer/unify.py @@ -64,7 +64,7 @@ kb = bytearray(b"x") # CHECK-L: kb:bytearray l = array([1]) -# CHECK-L: l:numpy.array(elt=numpy.int?) +# CHECK-L: l:numpy.array(elt=numpy.int?, num_dims=1) IndexError() # CHECK-L: IndexError:():IndexError