Skip to content

pixel_replace should not change warning global state #10535

@pllim

Description

@pllim

These should be in a context manager:

warnings.filterwarnings(action="ignore", message="All-NaN slice encountered")

warnings.filterwarnings(action="ignore", message="All-NaN slice encountered")

Similar to this:

with warnings.catch_warnings():
warnings.filterwarnings("ignore", "overflow encountered", RuntimeWarning)

cc @tapastro @melanieclarke

(Found while working on #9793)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions