Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use FutureWarning for future warnings #3244

@DSLituiev

Description

@DSLituiev

Description

skimage/transform/_warps.py contains a lots of future warnings about next versions that are not labelled as FutureWarning. When one needs to suppress future warnings (to see user warnings), one would normally use

import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)

However, in skimage all future warnings are not marked properly, so it will mess this up.

Solution

replace warn(x) with warn(x, FutureWarning)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions