Skip to content

[BUG] Cannot convert typed memoryviews between equivalent types. #5373

@metab0t

Description

@metab0t

Describe the bug

Cannot convert typed memoryviews between equivalent types.

Code to reproduce the behaviour:

ctypedef int T

cdef f(int[:] x):
    cdef T[:] y
    y = x

Expected behaviour

It should work because T is just an alias of int.
But Cython complains that Memoryview 'int[:]' not conformable to memoryview 'T[:]'

OS

Windows

Python version

3.10.10

Cython version

3.0.0.b2

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions