Skip to content

Commit

Permalink
Fixes for Python 3.13, Numpy 2, Matplotlib 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
anntzer committed Nov 1, 2024
1 parent 8a031ea commit d119c4b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
flag: [""]
include:
- python-version: "3.7"
flag: "oldest"
- python-version: "3.12"
- python-version: "3.13"
flag: "pre"
steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 1 addition & 2 deletions examples/date.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
dt.timedelta(hours=2))
y = np.sin(t)
fig, ax = plt.subplots()
ax.plot_date(t, y, "-")
fig.autofmt_xdate()
ax.plot(mdates.num2date(t), y, "-")

# Note that mplcursors will automatically display the x-values as dates.
mplcursors.cursor()
Expand Down
2 changes: 1 addition & 1 deletion src/mplcursors/_pick_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def _compute_projection_pick(artist, path, xy):
# following are `LINETO` or `CLOSEPOLY`, and the last one is `STOP`, i.e.
# codes = path.codes
# assert (codes[0], codes[-1]) == (path.MOVETO, path.STOP)
# assert np.in1d(codes[1:-1], [path.LINETO, path.CLOSEPOLY]).all()
# assert np.isin(codes[1:-1], [path.LINETO, path.CLOSEPOLY]).all()
vertices = tpath.vertices[:-1]
codes = tpath.codes[:-1]
mt_idxs, = (codes == tpath.MOVETO).nonzero()
Expand Down

0 comments on commit d119c4b

Please sign in to comment.