From 6e2012765425d65e64fb458065592e70a2e0c9df Mon Sep 17 00:00:00 2001 From: Proton Date: Mon, 4 Jul 2022 18:51:36 +0800 Subject: [PATCH] add static ndrange test --- tests/python/test_ndrange.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/python/test_ndrange.py b/tests/python/test_ndrange.py index db6fbe8559cce..abf0b5618593d 100644 --- a/tests/python/test_ndrange.py +++ b/tests/python/test_ndrange.py @@ -303,3 +303,15 @@ def example(): r"Every argument of ndrange should be an integer scalar or a tuple/list of \(int, int\)" ): example() + + +@test_utils.test() +def test_static_ndrange_should_accept_numpy_integer(): + a, b = np.int64(0), np.int32(10) + + @ti.kernel + def example(): + for i in ti.static(ti.ndrange((a, b))): + pass + + example()