Skip to main content

A pure python implementation of numpy array

Project description

Pure Python array (pure_array)

A pure python implementation of the array data structure of numpy. This work is not intended to be a replacement for numpy, but rather a possible alternative when numpy is not allowed. This implementation has the same syntax as numpy, but not all functions are implemented.

Installation

pip install pure_array

You can also install the development version from GitHub:

git clone https://github.com/ferranSanchezLlado/pure_array.git
cd pure_array
pip install -e .

Usage

import pure_array as np

a = np.array([1, 2, 3])
b = np.array([4, 5, 6])

assert a + b == np.array([5, 7, 9])
assert a * b == np.array([4, 10, 18])   
assert a.max() == 3

Requirements

As can be seen from the requirements.txt there are no requirements for the package itself, but the tests (requirements_dev.txt) require pytest and flake8 can be used for linting.

License

MIT

Future work

  • Implement boolean indexing
  • Documentation
  • Better static typing
  • More tests
  • More functions

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

pure_array-0.1.0.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

pure_array-0.1.0-py3-none-any.whl (5.9 kB view hashes)

Uploaded Python 3

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