FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
lpython/integration_tests/array_05.py at main · Pranavchiku/lpython · GitHub
Pranavchiku
/
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_05.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
39 lines (30 loc) · 712 Bytes
Breadcrumbs
lpython
/
integration_tests
/
array_05.py
Copy path
File metadata and controls
39 lines (30 loc) · 712 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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from
lpython
import
i32
,
f64
,
Array
from
numpy
import
empty
,
int32
,
float64
def
test_1
():
y
:
Array
[
f64
,
3
]
=
empty
([
3
],
dtype
=
float64
)
y
[
0
]
=
3.14
y
[
1
]
=
-
4.14
y
[
2
]
=
100.100
print
(
y
)
assert
abs
(
y
[
0
]
-
(
3.14
))
<=
1e-6
assert
abs
(
y
[
1
]
-
(
-
4.14
))
<=
1e-6
assert
abs
(
y
[
2
]
-
(
100.100
))
<=
1e-6
def
test_2
():
x
:
Array
[
i32
,
2
,
3
]
=
empty
([
2
,
3
],
dtype
=
int32
)
x
[
0
,
0
]
=
5
x
[
0
,
1
]
=
-
10
x
[
0
,
2
]
=
15
x
[
1
,
0
]
=
4
x
[
1
,
1
]
=
-
14
x
[
1
,
2
]
=
100
print
(
x
)
assert
x
[
0
,
0
]
==
5
assert
x
[
0
,
1
]
==
-
10
assert
x
[
0
,
2
]
==
15
assert
x
[
1
,
0
]
==
4
assert
x
[
1
,
1
]
==
-
14
assert
x
[
1
,
2
]
==
100
def
main0
():
test_1
()
test_2
()
main0
()
Back
|
FazBrowse Home
|
New Git URL