[Python-Dev] Assertion in _PyManagedBuffer_FromObject() (original) (raw)
Stefan Krah stefan at bytereef.org
Sat Mar 3 09:48:18 CET 2012
- Previous message: [Python-Dev] Assertion in _PyManagedBuffer_FromObject()
- Next message: [Python-Dev] Assertion in _PyManagedBuffer_FromObject()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Stefan Behnel <stefan_ml at behnel.de> wrote:
Yes, that's a suitable example. It would take the ndarray out of the loop - after all, it has nothing to do with what the memoryview wants, and won't need to do any cleanup for the memoryview's buffer view either. Keeping it explicitly alive in the memoryview is just a waste of resources.
Yes, this should be supported. The "cleanup handler" in the earlier example got me on the wrong track, that's why I kept insisting this wasn't necessary.
I'm not using this anywhere. My guess is that it would be more of a feature than something to provide legacy code support for, but I can't speak for anyone else. In general, the NumPy mailing list is a good place to ask about these things.
NumPy re-exports, this was confirmed in issue #10181. That's actually the main reason why I considered re-exporting rather than redirecting the standard model and built the test suite around it.
Stefan Krah
- Previous message: [Python-Dev] Assertion in _PyManagedBuffer_FromObject()
- Next message: [Python-Dev] Assertion in _PyManagedBuffer_FromObject()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]