Commit fe8c84b0 authored by Pierre Augier's avatar Pierre Augier
Browse files

Simplify cython_bugs/purepy_fusedtype

parent 3c238f68fe5a
import cython
import numpy as np
cimport numpy as np
ctypedef fused A:
np.int_t[:]
np.float_t[:]
int[:]
float[:]
@cython.locals(arr=A)
cpdef func(A arg)
import numpy as np
def func(arg):
arr = np.empty_like(arg)
arr = arg
return arr
import cython
import numpy as np
cimport numpy as np
ctypedef fused A:
np.int_t[:]
np.float_t[:]
int[:]
float[:]
cpdef func(A arg):
cdef A arr = np.empty_like(arg)
cdef A arr = arg
return arr
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment