FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
lpython/integration_tests/array_expr_07.py at main · mfkiwl/lpython · GitHub
mfkiwl
/
lpython
Public
forked from
lcompilers/lpython
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
lpython
/
integration_tests
/
array_expr_07.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
21 lines (16 loc) · 624 Bytes
Breadcrumbs
lpython
/
integration_tests
/
array_expr_07.py
Copy path
File metadata and controls
21 lines (16 loc) · 624 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
c32
,
c64
,
f32
from
numpy
import
complex64
,
complex128
,
array
def
g
():
a32
:
c32
[
4
]
=
array
([
127
,
-
127
,
3
,
111
],
dtype
=
complex64
)
a64
:
c64
[
4
]
=
array
([
127
,
-
127
,
3
,
111
],
dtype
=
complex128
)
print
(
a32
)
print
(
a64
)
assert
(
abs
(
a32
[
0
]
-
c32
(
127
))
<=
f32
(
1e-5
))
assert
(
abs
(
a32
[
1
]
-
c32
(
-
127
))
<=
f32
(
1e-5
))
assert
(
abs
(
a32
[
2
]
-
c32
(
3
))
<=
f32
(
1e-5
))
assert
(
abs
(
a32
[
3
]
-
c32
(
111
))
<=
f32
(
1e-5
))
assert
(
abs
(
a64
[
0
]
-
c64
(
127
))
<=
1e-5
)
assert
(
abs
(
a64
[
1
]
-
c64
(
-
127
))
<=
1e-5
)
assert
(
abs
(
a64
[
2
]
-
c64
(
3
))
<=
1e-5
)
assert
(
abs
(
a64
[
3
]
-
c64
(
111
))
<=
1e-5
)
g
()
Back
|
FazBrowse Home
|
New Git URL