pynrrd
pynrrd is a pure-Python module for reading and writing NRRD files into and from numpy arrays.
Requirements
typing_extensions
v1.0+ requires Python 3.7 or above. If you have an older Python version, please install a v0.x release instead.
Installation
Install via pip and PyPi repository (recommended)
pip install pynrrd
Install via pip and GitHub
pip install git+https://github.com/mhe/pynrrd.git
Install from source (recommended for contributing to pynrrd)
For developers that want to contribute to pynrrd, you can clone the pynrrd repository and install it using the following commands:
git clone https://github.com/mhe/pynrrd.git
cd pynrrd
pip install .
or, for the last line, instead use:
pip install -e .
to install in ‘develop’ or ‘editable’ mode, where changes can be made to the local working code and Python will use the updated pynrrd code.
Tests
The tests can be run via the following command from the base directory:
python -m unittest discover -v nrrd/tests
Format and Lint code
This repository uses pre-commit hooks to run format and lint the code and they are enforced in CI. See [pre-commit](https://pre-commit.com)
Example usage
import numpy as np
import nrrd
# Some sample numpy data
data = np.zeros((5,4,3,2))
filename = 'testdata.nrrd'
# Write to a NRRD file
nrrd.write(filename, data)
# Read the data back from file
readdata, header = nrrd.read(filename)
print(readdata.shape)
print(header)
Next Steps
For more information, see the documentation.
License
See the LICENSE for more information.
Metadata
Release files for pynrrd 1.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pynrrd-1.1.3.tar.gz | 21.7 kB | Without provenance | Details for pynrrd-1.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pynrrd-1.1.3-py3-none-any.whl | Python 3 | none | any | Details for pynrrd-1.1.3-py3-none-any.whl |
Total release size: 45.2 kB
Release files / pynrrd-1.1.3.tar.gz
| Download URL | pynrrd-1.1.3.tar.gz |
|---|---|
| Size | 21.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a331263bc9f05c3168182e61d6098e256a34e0fadbb7427a1d086d8942fbcbe0
|
|
BLAKE2b-256 checksum How to use checksums |
d7885cf97e319ca11a2983938e6e486011166a4e580678cfe575d980146c74af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / pynrrd-1.1.3-py3-none-any.whl
| Download URL | pynrrd-1.1.3-py3-none-any.whl |
|---|---|
| Size | 23.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
21f7e370045e7ef8a86841965b2ff3a18937efbb4e2078e346168463f8f34b7e
|
|
BLAKE2b-256 checksum How to use checksums |
218434fa17e364f8332021d4b0f75beecd4b95a76a41449e96ed0ddac5a767e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Security for pynrrd 1.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.