JorritMontijn/zetapy

Bug when supplying a 1D array as event times

guidomeijer opened this issue · 2 comments

Thanks for providing this amazing statistical test with python code! There currently is a bug in the code that prevents inputting a 1D array as matEventTimes while the docstring states that it should be possible. To fix it you have to change lines 100-103 to the following:

    if len(matEventTimes.shape) > 1:
       boolStopSupplied = True
       if np.shape(matEventTimes)[1] > 2:
           matEventTimes = np.transpose(matEventTimes)
    else:
        matEventTimes = np.vstack((matEventTimes, np.zeros(matEventTimes.shape))).T

Cheers, Guido

Thanks for pushing the fix. Yes I'd be happy to help improve the python code! I already found a couple of other bugs.