Skip to content

Conversation

@larsoner
Copy link
Member

@larsoner larsoner commented Feb 1, 2021

Fixes for a NumPy dtype promotion deprecation that happens due to union1d. It's easy enough to work around using sets. Despite code comments about ordering based on time, union1d always returns a sorted output:

>>> np.union1d(('a', 'c', 'b', 'b'), ('d',))
array(['a', 'b', 'c', 'd'], dtype='<U1')

So this PR maintains this behavior (and removes the errant comment) by using sorted and set directly.

@larsoner larsoner merged commit 02572fa into mne-tools:main Feb 1, 2021
@larsoner larsoner deleted the numpy branch February 1, 2021 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants