np.unicode_ was removed in the NumPy 2.0 release. Use np.str_ instead
No module named 'numpy.histogram'
and the following warning:
\e isn't a valid escape
disutils was used to import the strtobool function. A copy of this function has been added to utils_general.py and is used instead.
np.unicode_ has been changed to np.str_ as advised by Numpy.
numpy.histogram was used to access the private function _hist_bin_fd which is deprecated by numpy. This function has been coped into the codebase directly instead. This might not be the best way to address this error. Changing the code to allow numpy to automate this calculation with something like hist, bin_edges = np.histogram(data, bins="fd") might be more maintainable but hasn't been implemented due to my lack of knowledge about the science requirements.
label=f"Best fit $\ell={l}$", code causes a warning error about improperly escaped characters. This has been changed to label=f"Best fit $\ell={l}$" which fixes the warning but might cause other issues I'm not aware of. This PR should be rejected if this is the case and I'll remove this part of the PR and submit again.
BASTA currently fails to run on Python 3.12.3 when following the documentation.
Cloning the BASTA repo, setting up a virtual environement, then following the instructions at https://basta.readthedocs.io/en/latest/running.html fails for the following reasons:
No module named 'disutils'
np.unicode_ was removed in the NumPy 2.0 release. Use np.str_ instead
No module named 'numpy.histogram'
and the following warning:
\e isn't a valid escape
disutils
was used to import the strtobool function. A copy of this function has been added to utils_general.py and is used instead.np.unicode_
has been changed tonp.str_
as advised by Numpy.numpy.histogram
was used to access the private function _hist_bin_fd which is deprecated by numpy. This function has been coped into the codebase directly instead. This might not be the best way to address this error. Changing the code to allow numpy to automate this calculation with something likehist, bin_edges = np.histogram(data, bins="fd")
might be more maintainable but hasn't been implemented due to my lack of knowledge about the science requirements.label=f"Best fit $\ell={l}$",
code causes a warning error about improperly escaped characters. This has been changed to label=f"Best fit $\ell={l}$" which fixes the warning but might cause other issues I'm not aware of. This PR should be rejected if this is the case and I'll remove this part of the PR and submit again.