| [ Web Proxy ] |
| Viewing: https://raw.githubusercontent.com/mfkiwl/lpython/main/integration_tests/array_expr_02.py | [Back] [Original] |
from lpython import i32, f32, TypeVar
from numpy import empty, sqrt, float32
n = TypeVar("n")
def modify(array_a: f32[:], n: i32) -> f32[n]:
return sqrt(array_a)
def verify(array_a: f32[:], array_b: f32[:], result: f32[:], size: i32):
i: i32
eps: f32
eps = f32(1e-6)
for i in range(size):
assert abs(array_a[i] * array_a[i] + sqrt(array_b[i]) - result[i])
| Web Proxy Viewer | New URL | Original Page |