FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
lpython/integration_tests/array_expr_06.py at refs/heads/main · lcompilers/lpython · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
lcompilers
/
lpython
Public
Notifications
You must be signed in to change notification settings
Fork
176
Star
1.6k
Code
Issues
500
Pull requests
80
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
lpython
/
integration_tests
/
array_expr_06.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
21 lines (16 loc) · 609 Bytes
Breadcrumbs
lpython
/
integration_tests
/
array_expr_06.py
Copy path
File metadata and controls
21 lines (16 loc) · 609 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from
lpython
import
f32
,
f64
from
numpy
import
float32
,
float64
,
array
def
g
():
a32
:
f32
[
4
]
=
array
([
127
,
-
127
,
3
,
111
],
dtype
=
float32
)
a64
:
f64
[
4
]
=
array
([
127
,
-
127
,
3
,
111
],
dtype
=
float64
)
print
(
a32
)
print
(
a64
)
assert
(
abs
(
a32
[
0
]
-
f32
(
127
))
<=
f32
(
1e-5
))
assert
(
abs
(
a32
[
1
]
-
f32
(
-
127
))
<=
f32
(
1e-5
))
assert
(
abs
(
a32
[
2
]
-
f32
(
3
))
<=
f32
(
1e-5
))
assert
(
abs
(
a32
[
3
]
-
f32
(
111
))
<=
f32
(
1e-5
))
assert
(
abs
(
a64
[
0
]
-
f64
(
127
))
<=
1e-5
)
assert
(
abs
(
a64
[
1
]
-
f64
(
-
127
))
<=
1e-5
)
assert
(
abs
(
a64
[
2
]
-
f64
(
3
))
<=
1e-5
)
assert
(
abs
(
a64
[
3
]
-
f64
(
111
))
<=
1e-5
)
g
()
Back
|
FazBrowse Home
|
New Git URL