[Mne_analysis] Equalize Event Counts Error

Alexandre Gramfort alexandre.gramfort at telecom-paristech.fr
Thu Jun 22 17:47:21 EDT 2017
Search archives:

Hi,

Can you share a code to replicate this on the sample data?

thanks
Alex

On Thu, Jun 22, 2017 at 8:19 PM, Cushing, Cody
<CCUSHING1 at mgh.harvard.edu> wrote:
> Hi,
>
> Whenever I try to use the epochs.equalize_event_counts, I get this same
> error:
>
>
>
> ###################
> ----> 1 epochs.equalize_event_counts(epochs1,epochs2)
>
> /usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/mne/epochs.pyc
> in equalize_event_counts(self, event_ids, method, copy)
>    1619             key_match = np.zeros(epochs.events.shape[0])
>    1620             for key in eq:
> -> 1621                 key_match = np.logical_or(key_match,
> epochs._key_match(key))
>    1622             eq_inds.append(np.where(key_match)[0])
>    1623
>
> /usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/mne/epochs.pyc
> in _key_match(self, key)
>    1323     def _key_match(self, key):
>    1324         """Helper function for event dict use"""
> -> 1325         if key not in self.event_id:
>    1326             raise KeyError('Event "%s" is not in Epochs.' % key)
>    1327         return self.events[:, 2] == self.event_id[key]
>
> TypeError: unhashable type: 'numpy.ndarray'
>
> ####################
>
>
> This happens on my data, and the sample data, and no matter how I define my
> event ids (dict or integer), so it doesn't really seem data dependent.  Has
> anyone encountered this before and know what is going on?
>
> Cheers,
> Cody
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
>


More information about the Mne_analysis mailing list