DeprecationWarning: `cumproduct` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `cumprod` instead.
fracs = phos.alpha(phs)
Should be Was an easy fix to simply replace the function. Since NumPy is already version >2 this will mean it does not run for any newer installations.
As a side note, you can use this code for the legend in the plot of the H3PO4 dissociation for proper formatting, as matplotlib supports latex:
plt.legend(['$H_3PO_4$', '${H_2PO_4}^{1-}$', '${HPO_4}^{2-}$', '${PO_4}^{3-}$'])
Should beWas an easy fix to simply replace the function. Since NumPy is already version >2 this will mean it does not run for any newer installations.As a side note, you can use this code for the legend in the plot of the H3PO4 dissociation for proper formatting, as matplotlib supports latex:
plt.legend(['$H_3PO_4$', '${H_2PO_4}^{1-}$', '${HPO_4}^{2-}$', '${PO_4}^{3-}$'])