stumpy icon indicating copy to clipboard operation
stumpy copied to clipboard

Improve `ignore_trivial` docstring

Open seanlaw opened this issue 2 years ago • 2 comments

It has come to our attention that the docstring for ignore_trivial may be too vague. We should consider improving the docs for this

seanlaw avatar Oct 24 '23 23:10 seanlaw

Not sure if the following observation helps, but IIRC there was a [similar] discussion before around it and so I thought it might be a good idea to just think about it again....

We can see this block of code in the beginning of the function stump.

https://github.com/TDAmeritrade/stumpy/blob/58ccc69fe1c6a6262af70b4de8257516d86464d2/stumpy/stump.py#L662-L665

So, if a user does stumpy.stump(T, m, ignore_trivial=False), they do not get a warning because ignore_trivial is forced to be set to True BEFORE the program reaches the following line

https://github.com/TDAmeritrade/stumpy/blob/58ccc69fe1c6a6262af70b4de8257516d86464d2/stumpy/stump.py#L698

Should we raise a warning in that if-block (before line 663)?

NimaSarajpoor avatar Oct 25 '23 02:10 NimaSarajpoor

Should we raise a warning in that if-block

We probably should. And mention this in the docstring

seanlaw avatar Oct 25 '23 04:10 seanlaw