Skip to content

DEP: drop mpmath as a depdendency, replaced with scipy - #13

Open
neutrinoceros wants to merge 1 commit into
birnstiel:masterfrom
neutrinoceros:dep/rm-mpmath
Open

DEP: drop mpmath as a depdendency, replaced with scipy#13
neutrinoceros wants to merge 1 commit into
birnstiel:masterfrom
neutrinoceros:dep/rm-mpmath

Conversation

@neutrinoceros

Copy link
Copy Markdown
Contributor

I think this is the correct replacement. However, I note that in my experiments with it, I hit some warnings in numpy, triggered from scipy:

/Users/clm/dev/gh/birnstiel/dsharp_opac/.venv/lib/python3.14/site-packages/scipy/_lib/array_api_compat/numpy/_aliases.py:106: ComplexWarning: Casting complex values to real discards the imaginary part

suggesting that scipy is maybe not solving correctly in the complex domain, or at the very least that it's doing something weird with numpy's API. I can probably dig it down further there, and I'll keep this PR as a draft until then.

@neutrinoceros

Copy link
Copy Markdown
Contributor Author

update: the warning I saw earlier only appears when using scipy.optimize.root_scalar(..., method='newton'), not when calling scipy.optimize.newton directly. Thus, this is ready for review

@neutrinoceros
neutrinoceros marked this pull request as ready for review March 4, 2026 16:18
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