From 3e92c491f55fccce8d5cfaeba5480b4b9b538b09 Mon Sep 17 00:00:00 2001 From: David Mak Date: Wed, 11 Sep 2024 15:52:43 +0800 Subject: [PATCH] [standalone] Add tests creating ndarrays with tuple dims --- nac3standalone/demo/src/ndarray.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nac3standalone/demo/src/ndarray.py b/nac3standalone/demo/src/ndarray.py index 9664b3f0..577ad9c3 100644 --- a/nac3standalone/demo/src/ndarray.py +++ b/nac3standalone/demo/src/ndarray.py @@ -114,12 +114,22 @@ def test_ndarray_ones(): n: ndarray[float, 1] = np_ones([1]) output_ndarray_float_1(n) + dim = (1,) + n_tup: ndarray[float, 1] = np_ones(dim) + output_ndarray_float_1(n_tup) + def test_ndarray_full(): n_float: ndarray[float, 1] = np_full([1], 2.0) output_ndarray_float_1(n_float) n_i32: ndarray[int32, 1] = np_full([1], 2) output_ndarray_int32_1(n_i32) + dim = (1,) + n_float_tup: ndarray[float, 1] = np_full(dim, 2.0) + output_ndarray_float_1(n_float_tup) + n_i32_tup: ndarray[int32, 1] = np_full(dim, 2) + output_ndarray_int32_1(n_i32_tup) + def test_ndarray_eye(): n: ndarray[float, 2] = np_eye(2) output_ndarray_float_2(n)