A package to allow downstream inter-compatibility for Numpy-compatible array structures
Project description
A library for downstream compatibility of Numpy-compatible arrays.
Usage
For an alternative array implementation
import numpy as np import arrayish as ai class CustomArray(object): """Your custom ``ndarray`` compatible implementation.""" pass def dot(a, b, out=None) """ Your custom implementation of ``np.dot``. """ pass # Between your own arrays ai.dot.add((CustomArray, CustomArray), dot) # With Numpy Arrays, if you'd like. Can also pass another function ai.dot.add((np.ndarray, CustomArray), dot) ai.dot.add((CustomArray, np.ndarray), dot)
For a downstream library willing to support alternative arrays
import arrayish as ai import numpy as np # Instead of this: np.dot(a, b) # Do this: ai.dot(a, b)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size arrayish-0.0.1-py2.py3-none-any.whl (2.7 kB) | File type Wheel | Python version py2.py3 | Upload date | Hashes View |
Filename, size arrayish-0.0.1.tar.gz (19.3 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for arrayish-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65ae4efb1e955b3c0fe53d66b150ddd648413346e13494650cbe80f78b1daa8a |
|
MD5 | 93c858cdfa6a3204dfbfa4d7edfd84da |
|
BLAKE2-256 | 6b5193ce4a400b1f08f85e8274fe11ea858d9723cdca8ced1b2a14a9a4574ed1 |