Skip to content

Error with to NumPy 2.4 due to trapz usage #8

Description

@AdrianBunk
qmix/mathfn/kktrans.py:73: in kk_trans_trapz
    ikk.append(np.trapz((i_prime - v_prime) / (v_prime - v[a]), x=v_prime))
               ^^^^^^^^
E       AttributeError: module 'numpy' has no attribute 'trapz'. Did you mean: 'trace'?

Due to:

https://numpy.org/doc/2.4/release/2.4.0-notes.html

numpy.trapz — deprecated since NumPy 2.0 (2023-08-18). Use numpy.trapezoid or scipy.integrate functions instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions