Closed livhe closed 7 months ago
Great! Can you invert the check? At the moment, it would only throw if users accidantly provide a series. But there are likely dozent other datatypes that would result in unexpected behaviour.
So I would suggest we check if something is a numpy array and if not throw, independent of the actual datatype. Keep in mind that isinstance
checks for numpy arrays must be made against np.ndarray
not np.array
Attention: 1 lines
in your changes are missing coverage. Please review.
Comparison is base (
4683032
) 91.57% compared to head (eb9da7b
) 91.55%.
Files | Patch % | Lines |
---|---|---|
gaitmap/utils/array_handling.py | 66.66% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The function does now check if a Series is supplied instead of a numpy array and throws an Error. It used to return just the first and last index for a Series.
Also, I think the statement "The end index is inclusive!" from the docs was misleading, because it sounds like the end index is pointing to the last element that is included in the True-region, but it points to the first False element.