Repository navigation
v0.8.2
Fix NumPy scalar interoperability and improve editor type inference without recursive Scalar arithmetic constraints.
- Decimal and Fraction operands, including SI.h and SI.kB, enter NumPy calculations as floats while stored constants and Python scalar behavior remain unchanged. Dimensional powers retain exact rational unit exponents.
- Array results expose concrete ndarray/NumPy-scalar types and native
.valuemethods; transpose preserves the magnitude type. Add strict checks for NumPy consumers and scalar consumers without NumPy. - Rewrite the README and add a runnable, illustrated blackbody example using
np.asarray([3000, 4000, 5000]) * si.Kwithout specifying dtype. Automatic inference for this construction is verified with NumPy 2.5 stubs; older stubs can still infer Any, although runtime support remains NumPy >= 2.1.
Validation: complete local suites on Python 3.12 and 3.13; minimum NumPy 2.1 runtime/typing checks; strict installed-wheel consumers with and without NumPy; Ruff, documentation examples, wheel/sdist build, and strict Twine metadata checks.
This patch does not add item assignment, true in-place operations, reduction outputs, or additional array backends.