Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicitly returning None not understood as valid memory view return type #3245

Open
jmd-dk opened this issue Nov 21, 2019 · 1 comment
Open

Implicitly returning None not understood as valid memory view return type #3245

jmd-dk opened this issue Nov 21, 2019 · 1 comment

Comments

@jmd-dk
Copy link

@jmd-dk jmd-dk commented Nov 21, 2019

A function with a return type declared as a memory view (e.g. double[:]) is allowed to return None, meaning that this is valid:

cdef double[:] func():
    return None

However, returning None implicitly is invalid:

cdef double[:] func():
    return

and generates an error on cythonization stating

Return value required

Of course this is no biggy, but it would be nice to allow the implicit syntax as well.

@scoder

This comment has been minimized.

Copy link
Contributor

@scoder scoder commented Nov 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.