Repository navigation
[MRG+1] Convert channel names to str - #4427
Conversation
| selection = selection[sel] | ||
| else: | ||
| ch_names_ = list(ch_names_) | ||
| ch_names_ = [str(ch) for ch in ch_names_] # convert names to str |
There was a problem hiding this comment.
I think it would be cleaner to set tolist() in places we are using np.str.
There was a problem hiding this comment.
Does this take care of np.bytes_ too?
There was a problem hiding this comment.
Agreed, we shouldn't end up with bytes, it means some earlier function needs to be fixed.
FYI with bytes we usually use b.decode(utf-8) instead of str because it's UTF-8 on Python 2.
Codecov Report
@@ Coverage Diff @@
## master #4427 +/- ##
=========================================
Coverage ? 82.75%
=========================================
Files ? 349
Lines ? 64252
Branches ? 9907
=========================================
Hits ? 53173
Misses ? 8341
Partials ? 2738 |
|
OK, done. All channel names are now lists of str. I have tested the extensions |
|
LGTM |
|
Thanks @cbrnr |
Fixes one issue mentioned in #4403 - the channel names had different types (
np.str_,str,np.bytes_). This converts them all to simple str.