Skip to content

v0.8.2

Choose a tag to compare

@DaitTHU DaitTHU released this 20 Oct 04:03
· 22 commits to main since this release

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 .value methods; 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.K without 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.