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

Keep string data as python str #536

Merged
merged 3 commits into from
Mar 15, 2022
Merged

Conversation

jgrewe
Copy link
Member

@jgrewe jgrewe commented Feb 5, 2022

With b3c21c3 we fixed the reading of 2D string data. Unfortunately, this implicitly converted python strings to np.str_. With this pr, we keep them as python strings.

fixes #534

@JuliaSprenger
Copy link

Would it make sense to add a test for this fix?

@jgrewe
Copy link
Member Author

jgrewe commented Mar 12, 2022

@JuliaSprenger thanks. Added a test, if you're happy, I guess you may approve and merge ;)

JuliaSprenger
JuliaSprenger previously approved these changes Mar 14, 2022
@JuliaSprenger
Copy link

I don't have the rights to merge. @mpsonntag can you?

mpsonntag
mpsonntag previously approved these changes Mar 14, 2022
Copy link
Contributor

@mpsonntag mpsonntag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@JuliaSprenger
Copy link

Thanks! Are you planning a minor release with the fix soon? In that case I could adjust the neo dependency already now.

@jgrewe
Copy link
Member Author

jgrewe commented Mar 14, 2022

actually yes. As soon as the other PRs pass and are merged. I need the changes in PR #537 for some current stuff.

That pr raises an interesting question: I think it fair to raise OutOfBound exceptions in our index_of methods but the methods that should return a chunk of data such as data_array.get_slice should not. Imho, they should simply return an invalid (empty) DataView, if there is actually no data in that slice. PR #537 goes that way for event data where it can easily happen that there are simply no events in the segment... For sampled data we still throw the exceptions...
If you have an opinion on that, it would be nice to know ;)

@jgrewe jgrewe dismissed stale reviews from mpsonntag and JuliaSprenger via d969bd0 March 15, 2022 09:25
Copy link
Contributor

@mpsonntag mpsonntag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase LGTM

@mpsonntag mpsonntag merged commit 7db7001 into G-Node:master Mar 15, 2022
@jgrewe jgrewe deleted the str_handling branch March 15, 2022 11:12
@JuliaSprenger
Copy link

Hi again! It seems all other PRs are merged. So is there a version 1.5.3. release coming soon?

@jgrewe
Copy link
Member Author

jgrewe commented Mar 25, 2022

@JuliaSprenger Done! :)

@JuliaSprenger
Copy link

Thank you :)

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.

Automatic conversion of metadata to np.str_
3 participants