csinva / imodels

Interpretable ML package 🔍 for concise, transparent, and accurate predictive modeling (sklearn-compatible).
https://csinva.io/imodels
MIT License
1.38k stars 122 forks source link

DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future #182

Closed davips closed 1 year ago

davips commented 1 year ago
python3.10/site-packages/imodels/tree/figs.py:491: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  preds[i] = _predict_tree_single_point(root, X[i])
csinva commented 1 year ago

Thanks for pointing this out! Just fixed this in e94d11592b58966ddd2f318670c452620aadbbae. Will be incorporated in the next release :)