scikit-hep / iminuit

Jupyter-friendly Python interface for C++ MINUIT2
https://scikit-hep.org/iminuit
Other
283 stars 76 forks source link

fix: include debug info on failures #946

Closed henryiii closed 10 months ago

henryiii commented 11 months ago

WIP, Adding debug info on failures.

henryiii commented 11 months ago

The newly detailed error:

RuntimeError: Unable to cast Python instance of type <class 'numpy.ndarray'> to C++ type 'double'
henryiii commented 11 months ago

This NumPy warning apparently has been around for a while:

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.

No, actually that's a separate issue / test failure. But I think NumPy 1.25-1.26 is likely causing the breakage (other than that warning as error above) by changing the C API to no longer convert implicitly, which is causing the pybind11 error.

henryiii commented 11 months ago

PS: Why is this only showing up in the coverage job?

HDembinski commented 10 months ago

I need to investigate this further, thanks for this patch which helps.

The coverage job runs more tests, that's why it fails while the other checks pass.

henryiii commented 10 months ago

Okay, great, let me know if I can help.