8000 [DOC] Add doc for memory views with custom numpy dtype by NicolasHug · Pull Request #2813 · cython/cython · GitHub
[go: up one dir, main page]

Skip to content

[DOC] Add doc for memory views with custom numpy dtype #2813

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

Merged
merged 3 commits into from
Dec 6, 2021

Conversation

NicolasHug
Copy link
Contributor

Closes #2760

I have added a section in the memory view doc that indicates how to use memory views on numpy array that have a custom dtype.

I really think this is something that should be in the docs somewhere. I needed this and the only source was one of the scipy paper from 2008.

@scoder
Copy link
Contributor
scoder commented Feb 1, 2019

Thanks. May I ask where you found this? I'd like to be sure that that's still the right way to do it these days (could well be).

@NicolasHug
Copy link
Contributor Author

S Behnel, R Bradshaw, D Seljebotn, Cython tutorial in Proceedings of the 8th Python in Science conference (SciPy 2009) page 9

"Cython structs are also allowed and corresponds to NumPy record arrays..."

@NicolasHug
Copy link
Contributor Author

Friendly ping ;)

Do you need me to update anything?

@da-woods
Copy link
Contributor

Can I ping this too? I think this is still the right way to do it, it is covered in the tests (

def test_memslice_structarray(data, dtype):
) and it's currently a bit of an omission from the docs.

@scoder scoder added this to the 3.0 milestone Dec 6, 2021
@scoder scoder merged commit 369b41c into cython:master Dec 6, 2021
@scoder
Copy link
Contributor
scoder commented Dec 6, 2021

Thanks

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

Successfully merging this pull request may close these issues.

cdef-ing a memory view or array with a custom numpy dtype
3 participants
0