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

monotonically increasing check should be ">=" #266

Open
greglucas opened this issue Jun 7, 2024 · 1 comment
Open

monotonically increasing check should be ">=" #266

greglucas opened this issue Jun 7, 2024 · 1 comment

Comments

@greglucas
Copy link

A monotonic function can have values that are equal to each other
https://en.wikipedia.org/wiki/Monotonic_function

so I believe this should be >=

return np.all(epoch_data[1:] > epoch_data[:-1])

It does seem like there is some ambiguity about whether monotonically increasing includes the equal sign or not. I couldn't figure out which definition ISTP compliance would want. "strictly increasing" would be how I would interpret the code currently.

@ericthewizard
Copy link
Contributor

A time series should be increasing in time (with no duplicate times); "strictly increasing" is probably better wording.

There's definitely some code out there (e.g., in IDL SPEDAS) that uses this assumption for performance reasons (I vaguely remember coming across it in the past).

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