Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bug causes to_rgba to fail inside cm.py #10890

Closed
Milestone
@Eagleames

Description

@Eagleames

I was running a test with some new images and plotting, code called cm.to_rgba() to convert the files for keras processing.

Matplotlib 2.1.2 (but verified in the current repository)

It 'works' however it throws an error, by mistake due to this error in code:

                if xx.dtype.kind == 'f':                    if norm and xx.max() > 1 or xx.min() < 0:                        raise ValueError("Floating point image RGB values "                                         "must be in the 0..1 range.")

If xx.min() <0 then this code piece triggers.

Should be:

                if xx.dtype.kind == 'f':                    if norm and (xx.max() > 1 or xx.min() < 0):                        raise ValueError("Floating point image RGB values "                                         "must be in the 0..1 range.")

Sorry.. not familiar enough with making pull requests and changes myself to do this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp