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

Skip to content

Cast to integer to get rid of numpy warning #3241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Aug 26, 2014
Prev Previous commit
Next Next commit
Cast to integer in contour
as suggested by comment
  • Loading branch information
jenshnielsen committed Jul 22, 2014
commit dc87d3b3eab3499ef9e103218dc425819f46fa48
1 change: 1 addition & 0 deletions lib/matplotlib/bezier.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ def split_path_inout(path, inside, tolerence=0.01, reorder_inout=False):
verts_right = right[:]

#i += 1

if path.codes is None:
path_in = Path(concat([path.vertices[:i], verts_left]))
path_out = Path(concat([verts_right, path.vertices[i:]]))
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def calc_label_rot_and_inline(self, slc, ind, lw, lc=None, spacing=5):
pl, lc, [xi[1]])

# Make integer
I = [np.floor(I[0]), np.ceil(I[1])]
I = [int(np.floor(I[0])), int(np.ceil(I[1]))]

# Actually break contours
if closed:
Expand Down
1 change: 0 additions & 1 deletion lib/matplotlib/hatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ def get_path(hatchpattern, density=6):
cursor = 0
for pattern in patterns:
if pattern.num_vertices != 0:
num_vertices
vertices_chunk = vertices[cursor:cursor + pattern.num_vertices]
codes_chunk = codes[cursor:cursor + pattern.num_vertices]
pattern.set_vertices_and_codes(vertices_chunk, codes_chunk)
Expand Down