--- id: ndcube version: "2.4.1" license: unclear license_treatment: unclear maintenance: active --- # ndcube — A package for multi-dimensional contiguous and non-contiguous coordinate aware arrays. License: unclear · Maintenance: active · Downloads: 99.3K/mo ## What it is and what it does ndcube is a SunPy-affiliated package that wraps multi-dimensional arrays with coordinate awareness, units, uncertainties, and metadata into a unified interface. It is designed to handle scientific data of any number of dimensions whose relationship to the real world can be described by World Coordinate System (WCS) translations—common in astronomy and solar physics. The package provides slicing, coordinate transformations, and plotting/animation capabilities across all array dimensions and axis types. The core use case is working with observational or simulated data where array indices map to real-world coordinates (e.g., spatial positions, wavelengths, or times). Rather than managing coordinates separately, ndcube binds them to the data, so slicing the array automatically updates the coordinate system. It depends on astropy for units and WCS support, numpy for array operations, scipy for numerical methods, and gwcs for generalized coordinate transformations. Use it for: - Slice and inspect solar or astronomical imaging data while preserving WCS coordinate metadata and units. - Transform multi-dimensional observational data between different coordinate systems (e.g., pixel to world coordinates). - Visualize and animate multi-dimensional scientific datasets with automatic axis labeling from WCS metadata. - Work with non-contiguous data arrays that share a common coordinate system. - Build scientific analysis pipelines that require coordinate-aware array operations with uncertainty tracking. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. ndcube manipulates, inspects, and visualizes multi-dimensional coordinate-aware data arrays with unified slicing, units, uncertainties, and World Coordinate System (WCS) transformations. Yes, if you work with multi-dimensional scientific data (especially astronomy or solar physics) that requires WCS coordinate transformations and unified slicing. The package is actively maintained, has low install friction, and integrates well with the astropy ecosystem. However, verify the license terms first—the metadata does not clearly specify one. Not necessary for general-purpose array manipulation. ## Install pip install ndcube uv add ndcube poetry add ndcube ## Installing ndcube Before you install: Low install friction; pure Python wheel. Active maintenance with a release 65 days ago and commits through 2026-08-11. Depends on well-established packages (astropy, numpy, scipy, gwcs). License in practice: License treatment is unclear—no SPDX identifier or raw license text is recorded in the package metadata. Verify the actual license before use in proprietary or restricted contexts. Quickstart: pip install ndcube import ndcube import astropy.units as u import numpy as np data = np.random.rand(10, 20) array = ndcube.NDCube(data, unit=u.Jy) Requires Python >=3.11. astropy, gwcs, numpy, and scipy must be installed. Verify before relying: - Actual license identifier and terms—metadata shows 'unclear' treatment with no SPDX or raw license field populated. - Whether WCS coordinate transformations and plotting/animation capabilities are production-ready for all axis types (spatial, temporal, spectral, etc.). - Performance characteristics and memory efficiency for very large multi-dimensional arrays. ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 99.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags multi-dimensional array coordinate transformation, WCS world coordinate system data, scientific data visualization slicing, ndarray with units and metadata, astronomical data cube handling, wcs-coordinates, astronomical-data, sunpy-affiliated [View on SkillFed](https://skillfed.io/packages/ndcube) · [View on PyPI](https://pypi.org/project/ndcube/)