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

Skip to content

Conversation

@GregoryAshton
Copy link
Contributor

Fixes issue in #3079 . I ran the tests
and nothing breaks but I am unsure if it will break something else.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be better as if any(float(x) < 0 or float(x) > 0 for x in arg): (and might as well change the rest in this function too).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second float conversion is unnecessary, as are both decimal points. The only purpose of the float conversion is to trigger an error if, for example,

arg = np.array(['a', 'b', 'c'])

Contrary to the comment, it raises a ValueError; but that serves the purpose just as well.

@tacaswell tacaswell added this to the v1.4.0 milestone May 29, 2014
tacaswell added a commit that referenced this pull request Jun 2, 2014
Adds check that rgb sequence is of length 3
@tacaswell tacaswell merged commit ea8fa7b into matplotlib:master Jun 2, 2014
@GregoryAshton GregoryAshton deleted the fix-issue-3079 branch July 26, 2014 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants