pymc-devs / pymc

Bayesian Modeling and Probabilistic Programming in Python
https://docs.pymc.io/
Other
8.66k stars 2k forks source link

Convert ndarray to scalar to avoid deprecation warning #7375

Open Prtm2110 opened 3 months ago

Prtm2110 commented 3 months ago

Description

This PR fixes a Numpy deprecation warning by converting ndarray values to scalars in the record method.

Changes- Updated record method to convert ndarray to scalar using val.item() before assignment. Reason- Prevents future errors due to deprecated implicit array-to-scalar conversions in Numpy.

Related Issue

Checklist

Type of change


📚 Documentation preview 📚: https://pymc--7375.org.readthedocs.build/en/7375/

welcome[bot] commented 3 months ago

Thank You Banner] :sparkling_heart: Thanks for opening this pull request! :sparkling_heart: The PyMC community really appreciates your time and effort to contribute to the project. Please make sure you have read our Contributing Guidelines and filled in our pull request template to the best of your ability.