Skip to content

Conversation

@jesper-olsen
Copy link

Summary

This PR fixes runtime errors encountered when running the code on recent Python and SciPy versions:

  • matplotlib.mlab.normpdf is deprecated and removed; replaced with scipy.stats.norm.pdf
  • round() calls on complex numbers cause TypeError; converted to use .real component
  • This ensures compatibility with Python 3.12 and SciPy 1.16+, and future-proofs against upcoming SciPy 1.17.0 errors

Testing

  • All existing tests pass after the changes
  • Notebook updated to use scipy.stats.norm.pdf instead of matplotlib.mlab

Notes

These changes do not affect existing functionality or output — only fixes warnings and errors related to deprecated or incompatible usage.

- Replace deprecated matplotlib.mlab.normpdf calls with scipy.stats.norm.pdf
- Convert complex distances to real before rounding to avoid TypeError
- Fixes runtime errors on Python 3.12 and SciPy 1.16+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant