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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
ae7b046b
Commit
ae7b046b
authored
Sep 09, 2016
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for complex numpy arithmetic #1433.
parent
c3f2d977
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
tests/run/complex_extern_GH1433.pyx
tests/run/complex_extern_GH1433.pyx
+17
-0
No files found.
tests/run/complex_extern_GH1433.pyx
0 → 100644
View file @
ae7b046b
# tag: numpy
cimport
numpy
as
np
def
divide
(
np
.
float64_t
x
,
np
.
complex128_t
y
):
"""
>>> divide(2, 1+1j)
(1-1j)
"""
return
x
/
y
def
pow
(
np
.
complex128_t
x
,
np
.
complex128_t
y
):
"""
>>> pow(1 + 1j, 2j) # doctest: +ELLIPSIS
(0.1599...+0.1328...j)
"""
return
x
**
y
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