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
Boxiang Sun
cython
Commits
800d96eb
Commit
800d96eb
authored
Aug 05, 2009
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
merge main branch to devel
parents
48358568
1c0020cb
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
470 additions
and
40 deletions
+470
-40
Cython/Includes/numpy.pxd
Cython/Includes/numpy.pxd
+453
-40
tests/run/numpy_test.pyx
tests/run/numpy_test.pyx
+17
-0
No files found.
Cython/Includes/numpy.pxd
View file @
800d96eb
This diff is collapsed.
Click to expand it.
tests/run/numpy_test.pyx
View file @
800d96eb
...
...
@@ -194,6 +194,11 @@ try:
Traceback (most recent call last):
...
ValueError: Item size of buffer (1 byte) does not match size of 'int' (4 bytes)
>>> test_complextypes()
1,1
1,1
8,16
"""
except
:
...
...
@@ -376,3 +381,15 @@ def test_unpacked_align(np.ndarray[UnpackedStruct] arr):
arr
[
0
].
a
=
22
arr
[
0
].
b
=
23
return
repr
(
arr
).
replace
(
'<'
,
'!'
).
replace
(
'>'
,
'!'
)
def
test_complextypes
():
cdef
np
.
complex64_t
x64
=
1
,
y64
=
1j
cdef
np
.
complex128_t
x128
=
1
,
y128
=
1j
x64
=
x64
+
y64
print
"%.0f,%.0f"
%
(
x64
.
real
,
x64
.
imag
)
x128
=
x128
+
y128
print
"%.0f,%.0f"
%
(
x128
.
real
,
x128
.
imag
)
print
"%d,%d"
%
(
sizeof
(
x64
),
sizeof
(
x128
))
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