You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we call astropy.cosmology.z_at_value, astropy fails with
File "/home/runner/work/pycbc/pycbc/.tox/py-search/lib/python3.9/site-packages/scipy/optimize/_minimize.py", line 887, in minimize_scalar
raise ValueError(message)
ValueError: Use of `bounds` is incompatible with 'method=Brent'.
Expected behavior
Astropy not fail
Actual behavior
This seems to be an incompatibility with the new scipy (1.10) release. In particular this patch scipy/scipy#17448 states that using "method='brent'" and giving bounds is now considered a failure, and one should use method='bounded' instead. I think the default method in scipy needs to be updated to match this?
Steps to Reproduce
using latest astropy and scipy 1.10
import astropy, scipy
from astropy.cosmology import FlatLambdaCDM
from astropy import units
cosmology = FlatLambdaCDM(H0=67.90, Om0=0.3065)
astropy.cosmology.z_at_value(cosmology.luminosity_distance, 100*units.Mpc)
Welcome to Astropy 👋 and thank you for your first issue!
A project member will respond to you as soon as possible; in the meantime, please double-check the guidelines for submitting issues and make sure you've provided the requested details.
GitHub issues in the Astropy repository are used to track bug reports and feature requests; If your issue poses a question about how to use Astropy, please instead raise your question in the Astropy Discourse user forum and close this issue.
If you feel that this issue has not been responded to in a timely manner, please send a message directly to the development mailing list. If the issue is urgent or sensitive in nature (e.g., a security vulnerability) please send an e-mail directly to the private e-mail feedback@astropy.org.
Description
When we call
astropy.cosmology.z_at_value
, astropy fails withExpected behavior
Astropy not fail
Actual behavior
This seems to be an incompatibility with the new scipy (1.10) release. In particular this patch scipy/scipy#17448 states that using "method='brent'" and giving bounds is now considered a failure, and one should use method='bounded' instead. I think the default method in scipy needs to be updated to match this?
Steps to Reproduce
using latest astropy and scipy 1.10
System Details
The text was updated successfully, but these errors were encountered: