lnccbrown / lnccbrown/ssm-simulators
B008 Do not perform function call `np.arange` in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable
- Dominant language
- Jupyter Notebook
- Stars
- 24
- Forks
- 18
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
```
t: np.ndarray = np.arange(0, 20, 0.1), # TODO: B008 Do not perform function call `np.arange` in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable
```
In file ssms/basic_simulators/drift_functions.py
https://github.com/lnccbrown/ssm-simulators/blob/b04d824839dc63bf0d50af48805bd8a95de960e7/ssms/basic_simulators/drift_functions.py#L192
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading ssms/basic_simulators/drift_functions.py around line 192 and inspect the function using the np.arange default. Confirm the default no longer performs that call during function definition, while preserving the documented time-array behavior; the linked file location is the main entry point provided.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100