Masked versions of array API compatible arrays
Project description
MArray[^1] adds masks to your favorite Python Array API Standard compatible array library.
Install with pip:
pip install marray
or conda:
conda install -c conda-forge marray-python
Use the from...import...as syntax to get a masked array namespace.
# use with any Array API compatible library, installed separately
from marray import numpy as mxp
import numpy as xp # optional (if the non-masked namespace is desired)
The resulting mxp namespace has all the features of xp that are specified
in the Array API standard, but they are modified to be mask-aware. Typically, the
signatures of functions in the mxp namespace match those in the standard;
the one notable exception is the addition of a mask keyword argument of asarray.
mxp.asarray([1, 2, 3], mask=[False, True, False])
# MArray(array([1, 2, 3]), array([False, True, False]))
In the spirit of the Zen of Python, this is the one and only obvious way to set the mask of an array.
Documentation provided by attributes of xp are exposed in the mxp
namespace and are accessible via help. For more information, please see
the tutorial.
[^1]: The MArray logo is a nod to NumPy's logo, but MArray is not affiliated with the NumPy project.
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.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file marray-0.0.6.tar.gz.
File metadata
- Download URL: marray-0.0.6.tar.gz
- Upload date:
- Size: 96.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
190b92106f90b308b0f9d4140dad18d17884aefa1584c0cc45e4262e1d2795dc
|
|
| MD5 |
43249273118f3b0c7b0ed3309a19fa42
|
|
| BLAKE2b-256 |
214f568c40be195c6d871cbc92d5e311a431387ba480ef2ccd868e40aceab6ed
|
File details
Details for the file marray-0.0.6-py3-none-any.whl.
File metadata
- Download URL: marray-0.0.6-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bc221e776e56820c17fed26fde345f479976e54753f3e6ea60769dd95d07087
|
|
| MD5 |
658c3089696052ea339c6db12bcffa66
|
|
| BLAKE2b-256 |
96c24c0f49a0d3ca04b005e6452b6c7a001a79f00b9dee039adafc35e20145a5
|