EventArray.arrayMinMeanMax() should raise an appropriate exception when used on a zero-length EventArray. As of commit 1e33a2a (which may have introduced the issue), this is what currently happens:
>>> a.getRangeMinMeanMax()
Traceback (most recent call last):
File "C:\Program Files\Python37\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "<input>", line 1, in <module>
File "C:\Users\dstokes\workspace\idelib\idelib\dataset.py", line 2277, in getRangeMinMeanMax
display=display, iterator=iterator)
File "C:\Users\dstokes\workspace\idelib\idelib\dataset.py", line 2229, in arrayMinMeanMax
if out[0, i, 0] > out[2, i, 0]:
IndexError: index 0 is out of bounds for axis 2 with size 0
Instead, it should return None or raise a more meaningful exception including a message explaining there is no data. The method getRangeMinMeanMax() (used above) is expected to return None if there is no data, and should catch the exception raised by arrayMinMeanMax(), or handle it returning None.
There may be other, similar methods that don't explicitly raise meaningful exceptions as well.
EventArray.arrayMinMeanMax()should raise an appropriate exception when used on a zero-lengthEventArray. As of commit 1e33a2a (which may have introduced the issue), this is what currently happens:Instead, it should return
Noneor raise a more meaningful exception including a message explaining there is no data. The methodgetRangeMinMeanMax()(used above) is expected to returnNoneif there is no data, and should catch the exception raised byarrayMinMeanMax(), or handle it returningNone.There may be other, similar methods that don't explicitly raise meaningful exceptions as well.