forked from M-Labs/nac3
18 lines
460 B
Python
18 lines
460 B
Python
@extern
|
|
def output_float64(x: float):
|
|
...
|
|
|
|
def output_ndarray_float_1(n: ndarray[float, Literal[1]]):
|
|
for i in range(len(n)):
|
|
output_float64(n[i])
|
|
|
|
def output_ndarray_float_2(n: ndarray[float, Literal[2]]):
|
|
for r in range(len(n)):
|
|
for c in range(len(n[r])):
|
|
output_float64(n[r][c])
|
|
|
|
def run() -> int32:
|
|
hello = np_ones((3, 4))
|
|
# output_float64(hello[2, 3])
|
|
output_ndarray_float_1(hello[::-2, 2])
|
|
return 0 |