Getting Error: events should be a NumPy array of integers

External Email - Use Caution

Dear All,

We are conducting an ERP experiment. In most cases, the precision of the
annotation time is up to two decimal points (e.g., 358.71, 1053.88).

When creating an epoch using the module mne.Epochs(), the compiler returns
an error:

TypeError: events should be a NumPy array of integers, got <class

Is there a way to bypass this type of error?

One strategy is by round the time (e.g., 358.71, 1053.88 to 359, 1054).
However, this may reduce the overall accuracy and precision of the

Appreciate for any advice.



-------------- next part --------------
An HTML attachment was scrubbed...

External Email - Use Caution

How are you creating the events array? The time (first) column is in
*samples*, where are by definition always integers, not in
(milli)seconds. If you annotations that are finer grained than samples,
then you need to round them to your sampling resolution (also because
there is no added value in having annotations that are finer grained
than your EEG samples).


External Email - Use Caution

Indeed it sounds like there is a confusion here between time in samples and
time in seconds. Have you read this tutorial? It hopefully makes the
distinction clearer: