deepmodeling / deepmodeling/tbplas
[Code scan] Import trapezoid integration from a supported API
- Dominant language
- No language data
- Stars
- 19
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
This issue comes from a Codex global scan of deepmodeling/tbplas at commit 4d3652b3dba8eb930e4869a6d41074f62d703692.
Severity: Medium
`tbplas.tbpm.analysis` imports `trapz` from `scipy.integrate`. In current SciPy releases this symbol is no longer available from that location, so importing the module can fail before any analysis code runs.
Code references:
https://github.com/deepmodeling/tbplas/blob/4d3652b3dba8eb930e4869a6d41074f62d703692/tbplas/tbpm/analysis.py#L6-L9
https://github.com/deepmodeling/tbplas/blob/4d3652b3dba8eb930e4869a6d41074f62d703692/tbplas/tbpm/analysis.py#L505-L509
Suggested fix: use the supported replacement, for example `scipy.integrate.trapezoid`, or provide a compatibility shim for older supported SciPy versions.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in tbplas/tbpm/analysis.py at the import around lines 6–9 and the integration call around lines 505–509. Check the repository’s supported SciPy versions before choosing the replacement or compatibility approach. Done means tbplas.tbpm.analysis imports successfully on supported versions and the trapezoid integration path still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100