Registry / data / pynrrd

pynrrd

JSON →
library1.1.3pypypi✓ verified 85d ago

Pure Python library for reading and writing NRRD (Nearly Raw Raster Data) files, compatible with NumPy. Version 1.1.3 supports Python >=3.7 and NumPy >=1.21. Release cadence is sporadic, with occasional maintenance updates.

pip install pynrrd
INSTALL
IMPORT
SIG · PYNRRD
P
pynrrd
datapythonv1.1.3
Install
3.7s avg
Import
Disk
89MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 89.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.7s · import 0.000s · 86MB
89MB installed
● package 89MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

read
from nrrd import read
import nrrd; nrrd.read()
NRRDHeader
from nrrd import NRRDHeader
NRRDError
from nrrd import NRRDError

Basic read/write example using numpy array.

import nrrd import numpy as np # Write a NRRD file data = np.random.rand(10, 10, 10) nrrd.write('example.nrrd', data) # Read a NRRD file read_data, header = nrrd.read('example.nrrd') print(header)
Debug
Known issues
breakingpynrrd v1.0.0 dropped support for Python 2 and Python 3.6 and below.
fix
Upgrade to Python 3.7+ and use pynrrd >=1.0.0.
affects: <1.0.0
breakingv1.1.0 dropped support for NumPy <1.21. If you use an older NumPy, pynrrd 1.1.0+ will not install.
fix
Upgrade NumPy to >=1.21.
affects: >=1.1.0
gotchanrrd.read() returns the data as a numpy array. If the file is compressed, the array may be read-only. To modify it, use np.array(data).
fix
Call np.asarray(data) or data.copy() to get a writable array.
affects: all
gotchaUsing pip install pynrrd while the import is import nrrd can confuse users. The package name on PyPI is pynrrd, but the module is nrrd.
fix
Always use 'import nrrd' (not 'import pynrrd').
affects: all
Upgrade
Version history
1.1.3latest on PyPI · released Jan 23, 2025
Audit
Dependencies
numpyrequiredRequired for array manipulation.
Agent activity
9 hits · last 30 days
node
8
Resources
pynrrd — pip install pynrrd · libregistry