Skip to content

silence_periods() error when using mode='noise' #4420

@edmundchong

Description

@edmundchong

Hi, I've been trying to use spikeinterface.preprocessing.silence_periods() which works fine when mode='zeros'. However, when I try mode='noise',

1287 dtype = np.dtype(dtype).name # Cast to string for serialization
1288 if dtype not in ("float32", "float64"):
-> 1289 raise ValueError(f"'dtype' must be 'float32' or 'float64' but is {dtype}")
1290 assert strategy in ("tile_pregenerated", "on_the_fly"), "'strategy' must be 'tile_pregenerated' or 'on_the_fly'"
1292 if np.isscalar(noise_levels):

ValueError: 'dtype' must be 'float32' or 'float64' but is int16

My rec.dtype returns int16 indeed. Do I need to do some conversion before I can use this? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions