Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
56eb63f0
Commit
56eb63f0
authored
Sep 24, 2009
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Failing numpy.pxd dtype serialization testcase
parent
09a64c54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
tests/run/numpy_test.pyx
tests/run/numpy_test.pyx
+16
-1
No files found.
tests/run/numpy_test.pyx
View file @
56eb63f0
...
...
@@ -199,6 +199,10 @@ try:
1,1
1,1
8,16
>>> test_point_record()
array([(0.0, 0.0), (1.0, -1.0), (2.0, -2.0)],
dtype=[('x', '!f8'), ('y', '!f8')])
"""
except
:
...
...
@@ -392,4 +396,15 @@ def test_complextypes():
print
"%d,%d"
%
(
sizeof
(
x64
),
sizeof
(
x128
))
cdef
struct
Point
:
np
.
float64_t
x
,
y
def
test_point_record
():
cdef
np
.
ndarray
[
Point
]
test
Point_dtype
=
np
.
dtype
([(
'x'
,
np
.
float64
),
(
'y'
,
np
.
float64
)])
test
=
np
.
zeros
(
3
,
Point_dtype
)
cdef
int
i
for
i
in
range
(
3
):
test
[
i
].
x
=
i
test
[
i
].
y
=
-
i
print
repr
(
test
).
replace
(
'<'
,
'!'
).
replace
(
'>'
,
'!'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment