Skip to content

Fix tdt default case dtype - #1650

Merged
samuelgarcia merged 1 commit into
NeuralEnsemble:masterfrom
h-mayorquin:fix_tdt_default_case
Mar 6, 2025
Merged

samuelgarcia merged 1 commit into
NeuralEnsemble:masterfrom
h-mayorquin:fix_tdt_default_case

Conversation

@h-mayorquin

@h-mayorquin h-mayorquin commented Mar 5, 2025 •

Copy link
Copy Markdown
Contributor

@samuelgarcia @alejoe91
This is from this error in SpikeInterface:

SpikeInterface/spikeinterface#3025

The thing is that for streams (StoreName) that have no matching data for the channel we assign the dtype as int and then transform it to string when we cast to the signal_channel_dtype for the struct.

This leads to the following error:

_dtype = "int"
_dtype_as_string = str(_dtype)

np.dtype(_dtype_as_string)
TypeError: data type "<class 'int'>" not understood

The solution is to use "int" as a placeholder instead.

I also changed some values that were used as numpy scalar as they will probably introduce bugs as they have done in the past.

@h-mayorquin h-mayorquin changed the title Fix tdt default case Fix tdt default case dtype Mar 5, 2025
@samuelgarcia

Copy link
Copy Markdown
Contributor

Thanks for this fix.

@samuelgarcia
samuelgarcia merged commit c283c23 into NeuralEnsemble:master Mar 6, 2025
@h-mayorquin
h-mayorquin deleted the fix_tdt_default_case branch March 6, 2025 17:38
@zm711 zm711 added this to the 0.14.1 milestone Mar 28, 2025
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.

3 participants