Closed Chip2916 closed 1 month ago
Hi @Chip2916 , big thanks for raising this issue. I shall fix this ASAP (or feel free to contribute a PR with changes like x.ptp()
-> np.ptp(x)
)
No problem, PR raised - also replaced instances of np.Inf with np.inf as latest Numpy releases removed use of np.Inf as part of change to namespaces to avoid multiple ways to access same attribute
Thank you! A new dalex
v1.7.1 with the fix is now on PyPI https://pypi.org/project/dalex/1.7.1/
Hey Dalex team!
Working on a package that has Dalex and Numpy as dependencies and have encountered an issue when using Dalex with >= Numpy 2.0.0.
When calling VariableImportance.plot() an error is raised (see below) due to the use of dl.ptp() here.
This is also present in other scripts such as AggregatedProfiles.plot() here
use of array.ptp() throughout the package would need to be replaced by np.ptp(array) to be compatible with latest numpy versions. This fix should not cause any issues for those who are still using numpy < 2.0.0.
Error:
Numpy Doc
As per the numpy migration guide certain methods have been replaced. One of them being array.ptp() being replaced by np.ptp(array)