Compatibility with >= Numpy 2.0.0 (update of ptp method) #571
Labels
bug 💣
Bug to fix
maintenance 🔨
Code enhancements, tests and maintenance
Python 🐍
Related to Python
short term ⏰
TODO short term
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)
The text was updated successfully, but these errors were encountered: