An experiment in trying to define a core and cleaned-up NumPy API: RNumPy
Don't use this just yet! It will be ready for production use soon, but the API may still change in the near future.
The main goals of this project:
- Provide a package with NumPy functions that contain the essence of NumPy for end users. I.e. what would the NumPy API look like if we could remove functions and objects from it and move things around without worrying about backwards compatibility.
- Answer the question: "what's the minimal set of functions needed to form a core of numpy?"
(1) allows end users to use
rnumpy instead of
numpy, and thereby work with a much
easier to navigate package where they can be confident that the functions they use are
well-maintained and "best practice". In many cases, NumPy contains multiple ways of doing
things. Superceded functions are kept for backwards compatibility. Often users won't realize
that, and use a function that has a more modern alternative. Using
rnumpy, they won't
have to worry about that.
Besides end users, (1) is also aimed at authors of NumPy-like libraries. It suggests a subset of the full NumPy API that makes sense to support.
(2) can form the basis of reimplementing other functions in terms of "core" functions.
An example may clarify this. To create an array filled with all the same values,
ndarray.fill. The fundamental building blocks are
So one could reimplement, e.g.,
def ones(...): return np.empty(...).fill(1)
Such implementations in terms of core functions is useful for
ndarray subclass authors,
people porting NumPy to other platforms (e.g. WebAssembly), and probably other groups of
See the docstring of
rnumpy/__init__.py for more details.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|rnumpy-0.0.1-py3-none-any.whl (12.1 kB) Copy SHA256 hash SHA256||Wheel||py3|
|rnumpy-0.0.1.tar.gz (6.6 kB) Copy SHA256 hash SHA256||Source||None|