Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trapz ImportError #662

Closed
Rapi1234 opened this issue Jul 31, 2024 · 1 comment
Closed

Trapz ImportError #662

Rapi1234 opened this issue Jul 31, 2024 · 1 comment

Comments

@Rapi1234
Copy link

When following the user guide, TESTCASE=<testcase_name> docker-compose up will throw the following error: ImportError: cannot import name 'trapz' from 'scipy.integrate'.

I assume a deprecated version of trapezoid is used. Changing the line from from scipy.integrate import trapz to scipy.integrate import trapezoid as trapz in the file /kpis/kpi_calculator.py worked for me. Maybe using numpy.trapz would also work (as done in some other files).

@dhblum
Copy link
Collaborator

dhblum commented Jul 31, 2024

Thanks @Rapi1234 for reporting and suggesting fixes. A patch has been merged to master in this PR to specify the version of scipy: #659. But your suggestion is good for when we update dependency versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants