Skip to content

Convert np.str_ to regular str in Annotations? #13922

@cbrnr

Description

@cbrnr

When creating an Epochs object with "bad" annotations, the non-empty drop log entries currently look like this (tuples of np.str_):

(np.str_('bad_segment'),)

With NumPy 1.x, these entries were regular Python strings, which I think was more readable and more intuitive.

I'm happy to submit a PR to revert the entries to plain strings. Alternatively, we could also consider changing Annotations.description from an np.ndarray with dtype=np.str_ to a plain list[str]. I can't think of a good reason why this field has to be a NumPy array, so I'd really prefer to make this change, which would automatically fix the drop log.

WDYT?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions