Crash when passing an ndarray with too many fields in the dtype #1712

Open
symbolique opened this Issue May 24, 2017 · 0 comments

Comments

Projects
None yet
1 participant
cimport numpy as np
import numpy as np

cdef packed struct Structure:
    double x

bad_dtype = np.dtype([
    ('x', np.float64),
    ('y', np.int32),
])

def process(np.ndarray[Structure] arr):
    pass

# the following line crashes
process(np.zeros(1, dtype=bad_dtype))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment