Type stubs for nibabel
Project description
nibabel-stubs
Type stubs for nibabel, a Python package for reading and writing neuroimaging file formats.
Installation
pip install nibabel-stubs
Usage
Once installed, type checkers like mypy, pyright, and IDEs like PyCharm and VS Code will automatically use these type stubs when you use nibabel in your code.
Example:
import nibabel as nib
# Type checkers will now understand nibabel's API
img = nib.load("example.nii.gz")
data = img.get_fdata()
affine = img.affine
header = img.header
What's Included
This package provides type hints for:
Nifti1ImageandNifti1Headerclassesload()andsave()functionsaffinesmodule utilitiesorientationsmodule utilities- Common nibabel operations with proper numpy array typing
Requirements
- Python >= 3.7
- numpy (for numpy.typing support)
Development
To contribute or modify these stubs:
- Clone the repository
- Edit
nibabel-stubs/__init__.pyi - Test with your type checker:
mypy your_test_file.py
License
See LICENSE.md for details.
Compatibility
These stubs are designed to work with nibabel's public API. If you find any issues or missing definitions, please open an issue or submit a pull request.
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 nibabel_stubs-0.1.0.tar.gz.
File metadata
- Download URL: nibabel_stubs-0.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a19ed78135328786313164a602527dc7a653b8357e4af11ec4d6c42dd1e9c2f7
|
|
| MD5 |
5d5cc03f1a8477ca7415e5f5d3640ba9
|
|
| BLAKE2b-256 |
ab0d65e2cce41dd61beea2c4b4514675f9435128abdc6d913c0eb148989b4947
|
File details
Details for the file nibabel_stubs-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nibabel_stubs-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b58a8732d976de79b2c7aaf8ca009294ba5360fe9332ccff206f92b4c08b2a35
|
|
| MD5 |
d8d2d752815d3a9b96d7e377a8abba1f
|
|
| BLAKE2b-256 |
d9da606a220f74d000a714eb716fe484256a81b3e98040ddbf20d83634623b01
|