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 myogenFixed
- NumPy 2.0 regression driving descending-drive / afferent cells.
DD.integrate,DD_Gamma.integrateandAffIa.integratenow coerce their input to a scalar vianp.asarray(y).item(), so driving a cell with a neoAnalogSignalslice (shape(1,)) works again under NumPy 2.0. Previously this raisedTypeError: 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_trainsimport (myogen.utils→myogen.utils.binning) in the Watanabe visualization example, made the noise parameter-sweep example sphinx-gallery-safe (Path("./results")instead ofPath(__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