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

Skip to content

Regression: Path.contains_points now returns uint instead of bool #6566

Closed
@astrofrog

Description

@astrofrog

In Matplotlib 1.5.1, contains_points return a boolean, consistent with the docstring:

In [1]: from matplotlib.path import Path

In [2]: Path([[1,2],[3,4],[5,6]]).contains_points([[1,2]])
Out[2]: array([False], dtype=bool)

However, in the latest developer version, an uint8 is returned:

In [15]: from matplotlib.path import Path

In [16]: Path([[1,2],[3,4],[5,6]]).contains_points([[1,2]])
Out[16]: array([0], dtype=uint8)

This causes issues with packages that are assuming bool, since masking arrays using an array of ints has a different results (it will either select the first or second element or both from an array), so I believe this is a regression.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions