Closed StellarStorm closed 11 months ago
Thanks a lot for this contribution @StellarStorm! Very much appreciated. This is all looking really good, however the automated tests seem to be failing due to some unrelated reason. I am traveling at the moment so I haven't got time to resolve that issue just now, but I will take a look in the next few days and then merge this through once we can confirm that all tests are passing. Thanks!!
Sounds great! I took a quick peek at the test logs and it looks like the issue may have something to do with sklearn
trying to be installed. sklearn
is a dummy package that points to scikit-learn
and says to install it instead . sklearn
was recently deprecated and installation is on a brownout schedule where installing raises an exception every so often, so that could be killing the tests.
EDIT: I'm not positive of your environment, but these might have something to do with it:
https://github.com/pyplati/platipy/blob/f1f6b100e41cf508aff8dc02dfb5b44db1251a68/poetry.lock#L2432
https://github.com/pyplati/platipy/blob/f1f6b100e41cf508aff8dc02dfb5b44db1251a68/poetry.lock#L3820
Hi @StellarStorm, yes I think you're spot on about the sklearn library name being deprecated which caused these tests to fail. However on rerun they are passing for now. So I am happy to merge this and I will address updating the sklearn package name in a future pull request.
Thanks again for your contribution! Really appreciate it :)
First off, thanks for a very useful tool!
This PR should help future-proof for the release of Numpy 2.0 while not changing any actual behavior of platipy. Currently, while using the latest Numpy (1.25), I get deprecation messages like this:
Here is the relevant deprecation notice for Numpy 1.25: https://numpy.org/devdocs/release/1.25.0-notes.html#deprecations
This change should not break compatibility with old versions, as
np.prod
has been a method since at least v1.10.1 (probably earlier), while platipy currently requires v1.10.2 as the minimum numpy version https://docs.scipy.org/doc/numpy-1.10.1/reference/generated/numpy.prod.html#numpy.prodAlso this change should be purely cosmetic. In the numpy pull request to deprecate
np.product
, it is replaced seamlessly bynp.prod
https://github.com/numpy/numpy/pull/23314/files