Skip to content

MyoGen 0.10.1

Latest

Choose a tag to compare

@RaulSimpetru RaulSimpetru released this 01 Jun 09:36

MyoGen 0.10.1 is a patch release that fixes a NumPy 2.0 regression introduced in 0.10.0.

If you drive descending-drive or afferent cells with single-sample neo AnalogSignal slices on NumPy 2.x, please upgrade — 0.10.0 raised TypeError: only 0-dimensional arrays can be converted to Python scalars in that documented usage pattern. Users passing plain floats were unaffected.

pip install --upgrade myogen   # or: uv add myogen

Fixed

  • NumPy 2.0 regression driving descending-drive / afferent cells. DD.integrate, DD_Gamma.integrate and AffIa.integrate now coerce their input to a scalar via np.asarray(y).item(), so driving a cell with a neo AnalogSignal slice (shape (1,)) works again under NumPy 2.0. Previously this raised TypeError: only 0-dimensional arrays can be converted to Python scalars (NumPy 2.0 no longer auto-casts a single-element array to a Python scalar), which broke the descending-drive example gallery. Covered by a regression test.
  • Docs gallery build. Corrected a wrong bin_spike_trains import (myogen.utilsmyogen.utils.binning) in the Watanabe visualization example, made the noise parameter-sweep example sphinx-gallery-safe (Path("./results") instead of Path(__file__)), and excluded the noise-calibration example from gallery execution since it requires a private iEMG recording that isn't available in CI.

Full changelog: https://github.com/NsquaredLab/MyoGen/blob/v0.10.1/CHANGELOG.md

Compare: v0.10.0...v0.10.1