Skip to main content

RNumPy

Project description

rnumpy

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:

  1. 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.
  2. 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, NumPy offers ones, zeros, empty, full, ones_like, zeros_like, empty_like, full_like and ndarray.fill. The fundamental building blocks are empty and ndarray.fill. So one could reimplement, e.g., ones as:

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 developers too.

See the docstring of rnumpy/__init__.py for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rnumpy-0.0.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

rnumpy-0.0.1-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file rnumpy-0.0.1.tar.gz.

File metadata

  • Download URL: rnumpy-0.0.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.22.0

File hashes

Hashes for rnumpy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 90b5bbeda89a23fc69201339a7f65cc3c63a37dd9e65e4632bbf8637be7a93e6
MD5 3049b787a59ca4d9fe5454c33a18061f
BLAKE2b-256 fcabbfd4dd2a7e4ec0cfeb04850012a76f097e431e40d748493a05e4983e3162

See more details on using hashes here.

File details

Details for the file rnumpy-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: rnumpy-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.22.0

File hashes

Hashes for rnumpy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 abfc7963133ecedf7a544bc676b3f8ab9bcba0fa9d1d02d57f9863c30a565321
MD5 53e648fa8572af9a6401af2708b0b0ea
BLAKE2b-256 ab9fd867ad64288fc967834105fcadefd04e0ac56bfd02554eaecfc3c4daae95

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page