FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
lpython/integration_tests/array_expr_03.py at main · tanay-man/lpython · GitHub
tanay-man
/
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_03.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
24 lines (16 loc) · 501 Bytes
Breadcrumbs
lpython
/
integration_tests
/
array_expr_03.py
Copy path
File metadata and controls
24 lines (16 loc) · 501 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
from
lpython
import
i8
,
i32
,
dataclass
,
field
from
numpy
import
empty
,
int8
,
array
@
dataclass
class
LPBHV_small
:
dim
:
i32
=
4
a
:
i8
[
4
]
=
field
(
default_factory
=
lambda
:
empty
(
4
,
dtype
=
int8
))
def
g
():
l2
:
LPBHV_small
=
LPBHV_small
(
4
,
array
([
127
,
-
127
,
3
,
111
],
dtype
=
int8
))
print
(
l2
.
dim
)
assert
l2
.
dim
==
4
print
(
l2
.
a
[
0
],
l2
.
a
[
1
],
l2
.
a
[
2
],
l2
.
a
[
3
])
assert
l2
.
a
[
0
]
==
i8
(
127
)
assert
l2
.
a
[
1
]
==
i8
(
-
127
)
assert
l2
.
a
[
2
]
==
i8
(
3
)
assert
l2
.
a
[
3
]
==
i8
(
111
)
g
()
Back
|
FazBrowse Home
|
New Git URL