Support __len__ for memoryview slices #1733

Open
symbolique opened this Issue Jun 14, 2017 · 0 comments

Comments

Projects
None yet
1 participant

Currently we are forced to use arr.shape[0] rather than len(arr) in code such as:

cdef int f(double[::1] arr) nogil:
    return len(arr)

Supporting __len__ would make it more convenient to convert existing Python code and would make the code more compact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment