Scipp is a Python library for multi-dimensional data arrays with labeled dimensions, designed for scientific data analysis, especially in neutron and muon scattering. It provides unit-aware data structures and operations, enabling robust handling of physical quantities. The current version is 26.3.1, and it maintains a rapid release cadence with monthly major updates.
pip install scippVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create a unit-aware `Variable` and then encapsulate it within a `DataArray` along with its coordinates. It then performs a basic operation (sum) that respects Scipp's unit-aware nature.
Upgrade your Python environment to 3.11 or a later version.
No direct fix; observe the new default text-based representation. If custom visualization is needed, consider external plotting libraries or manual rendering.
Ensure units are compatible for operations, convert units using `.to()` method, or explicitly strip units with `var.without_units()` if desired.
To get the NumPy array from a `Variable` or `DataArray`'s data, use `my_var.values` or `my_data_array.values`.
Run `pip install scipp` to install the library.
Ensure all operands have compatible units. Use `my_var.to(target_unit)` to convert units or `my_var.without_units()` to remove units before the operation.
Access the underlying NumPy array first using `.values` attribute: `my_variable.values[0]`.
Ensure dimensions align or explicitly broadcast/reorder them. For element-wise operations, dimensions and their order must match. Use `my_da.transpose()` or ensure common dimensions are present.