Implement/Fix support for tuple-indexing into ndarrays #429

Merged
sb10q merged 3 commits from enhance/issue-149-ndarray/nd-indices into master 2024-06-20 12:50:31 +08:00
1 changed files with 10 additions and 0 deletions
Showing only changes of commit 5ad2db89d6 - Show all commits

View File

@ -150,6 +150,15 @@ def test_ndarray_slices():
x2 = x[0::2, 0::2]
output_ndarray_float_2(x2)
def test_ndarray_nd_idx():
x = np_identity(2)
x0: float = x[0, 0]
output_float64(x0)
output_float64(x[0, 1])
output_float64(x[1, 0])
output_float64(x[1, 1])
def test_ndarray_add():
x = np_identity(2)
y = x + np_ones([2, 2])
@ -1393,6 +1402,7 @@ def run() -> int32:
test_ndarray_neg_idx()
test_ndarray_slices()
test_ndarray_nd_idx()
test_ndarray_add()
test_ndarray_add_broadcast()