Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
fluiddyn
transonic
Commits
a94599e6ddf4
Commit
fe8c84b0
authored
Sep 15, 2019
by
Pierre Augier
Browse files
Simplify cython_bugs/purepy_fusedtype
parent
3c238f68fe5a
Changes
3
Hide whitespace changes
Inline
Side-by-side
doc/for_dev/cython_bugs/purepy_fusedtype/bug.pxd
View file @
a94599e6
import
cython
import
numpy
as
np
cimport
numpy
as
np
ctypedef
fused
A
:
n
p
.
int_
t
[:]
np
.
float
_t
[:]
i
nt
[:]
float
[:]
@
cython
.
locals
(
arr
=
A
)
cpdef
func
(
A
arg
)
doc/for_dev/cython_bugs/purepy_fusedtype/bug.py
View file @
a94599e6
import
numpy
as
np
def
func
(
arg
):
arr
=
np
.
empty_like
(
arg
)
arr
=
arg
return
arr
doc/for_dev/cython_bugs/purepy_fusedtype/works.pyx
View file @
a94599e6
import
cython
import
numpy
as
np
cimport
numpy
as
np
ctypedef
fused
A
:
n
p
.
int_
t
[:]
np
.
float
_t
[:]
i
nt
[:]
float
[:]
cpdef
func
(
A
arg
):
cdef
A
arr
=
np
.
empty_like
(
arg
)
cdef
A
arr
=
arg
return
arr
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