typewriter icon indicating copy to clipboard operation
typewriter copied to clipboard

Correct error type + order + error text

Open OGordon100 opened this issue 3 years ago • 0 comments

I see 2 issues with the ObservationStackingFilter object.

The current implementation checks that the input is less than 0, then checks that the input is a number. But if it's not a number, the checks that it is a number will never run. So when this check needs to be failed, the code has already failed earlier on, making it pointless.

Swapping the order fixes this. This should also be a TypeError, not a ValueError.

Secondly, there is no valid case for stacking 0 or 1 frames, so the code should assert >= 2, not >0

OGordon100 avatar Sep 08 '20 12:09 OGordon100