Skip to content

[Bug] importError simps with scipy 0.15 #672

@jenliujenliujen

Description

@jenliujenliujen

Using elephant v1.0.0 with newer versions of scipy (>=0.15.3), I encountered the following error:

File "/home/.conda/envs/py310/lib/python3.10/site-packages/elephant/current_source_density.py", line 41, in <module> from scipy.integrate import simps ImportError: cannot import name 'simps' from 'scipy.integrate' (/home/.conda/envs/py310/lib/python3.10/site-packages/scipy/integrate/__init__.py)

This is caused by the deprecation/removal of simps in scipy.integrate. According to recent scipy versions, simpson should be used instead.

Proposed fix:
Original:
from scipy.integrate import simps

Proposed fix in ln41 current_source_density.py:
from scipy.integrate import simpson as simps

Environment:
• Elephant version: 1.0.0 (installed using pip)
• Scipy version: 1.15.3
• Python: 3.10
• OS: Linux (Conda environment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions