I write this because even through I’m using numpy and scipy a lot in my programs, I don’t find it very satisfying in every use case.
So I started thinking about ways to make it better. I wrote this manifest.
To start thinking about the API I asked the following questions: What in definitely is a numpy array ?
answer: a buffer
It’s just an object to put numbers in in an optimized way that allows compiled operations on it, thus fastening computation and storage.
This was the mainline
The manifest is more complete than this post, but here are the features the proposed API should add:
extensible (list-like) optimized arrays
stacking arrays without copying
arrays not owning the data
allowing to use any object with the buffer protocol as an array, without any copy
array elements type (dtype) can be any user-defined class
including python class or compiled library type (think about https://github.com/Zuzu-Typ/PyGLM)
multiple array types
with common functions and additional methods specialized for the particular array
object oriented and subclassable types
possibility to add custom optimized operations
so if you want to rewrite some operations like array.add or some math functions using a JIT compiler or a C-module, you can
non-buffer arrays, like databases from files
participation, crisitcism and ideas are welcome
The main motivation for this is to try provide a more convenient and powerfull numpy to the community
What do you think of such an API ?
Do you have folks some ideas of what to add to this API ? (can be just function name changes, or fundamental design concerns)
Is some interested in implementing this together with me in a future ?