Skip to content

Axisartist testing + bugfixes #7545

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 16 commits into from
Feb 9, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix axisartist.floating_axes error with new NumPy.
It raises "TypeError: Cannot cast ufunc subtract output from
dtype('float64') to dtype('int64') with casting rule 'same_kind'" due to
in-place subtraction.
  • Loading branch information
QuLogic committed Feb 6, 2018
commit bcd41e48893b1ae30cbb24fb53bb5026c25f89a2
8 changes: 4 additions & 4 deletions lib/mpl_toolkits/axisartist/floating_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ def transform_xy(x, y):

xx1, yy1 = transform_xy(xx0, yy0)

xx00 = xx0.copy()
xx00 = xx0.astype(float, copy=True)
xx00[xx0+dx>xmax] -= dx
xx1a, yy1a = transform_xy(xx00, yy0)
xx1b, yy1b = transform_xy(xx00+dx, yy0)

yy00 = yy0.copy()
yy00 = yy0.astype(float, copy=True)
yy00[yy0+dy>ymax] -= dy
xx2a, yy2a = transform_xy(xx0, yy00)
xx2b, yy2b = transform_xy(xx0, yy00+dy)
Expand All @@ -158,12 +158,12 @@ def transform_xy(x, y):
xx1, yy1 = transform_xy(xx0, yy0)


yy00 = yy0.copy()
yy00 = yy0.astype(float, copy=True)
yy00[yy0+dy>ymax] -= dy
xx1a, yy1a = transform_xy(xx0, yy00)
xx1b, yy1b = transform_xy(xx0, yy00+dy)

xx00 = xx0.copy()
xx00 = xx0.astype(float, copy=True)
xx00[xx0+dx>xmax] -= dx
xx2a, yy2a = transform_xy(xx00, yy0)
xx2b, yy2b = transform_xy(xx00+dx, yy0)
Expand Down