Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new h5py version doesn't support numerical event labels #832

Open
rgutzen opened this issue Mar 9, 2021 · 2 comments
Open

new h5py version doesn't support numerical event labels #832

rgutzen opened this issue Mar 9, 2021 · 2 comments

Comments

@rgutzen
Copy link

rgutzen commented Mar 9, 2021

It appears that with h5py version 3.0.0 there is some additional type control, and creating a neo.Event with numerical labels and saving it as .nix results in an error Can't implicitly convert non-string objects to strings (using neo 0.9.0, nixio 1.5.0b6, h5py 3.1.0). However, this was still possible when using h5py 2.10.0 and the same neo and nixio versions.
This may be the desired behavior as the neo documentation also says to use "(numpy.array 1D dtype=’U’ or list)" for event labels. Otherwise, for more flexibility, the nixio could try to convert labels itself and raise its own warnings or errors.

rgutzen added a commit to NeuralEnsemble/cobrawap that referenced this issue Mar 9, 2021
@jgrewe
Copy link
Member

jgrewe commented Mar 9, 2021

Hi @rgutzen, thanks for the report. I would prefer the more flexible approach. We will talk about it.

@achilleas-k
Copy link
Member

Hey Robin. Like you said, Neo docs say labels should be unicode strings (dtype='U'), so if we do make this flexible, I would either do it in the Neo NIXIO as a convenience, or see if the Neo devs themselves would like to add the flexibility in the Event/Epoch constructor.

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

No branches or pull requests

3 participants