Skip to content

Commit

Permalink
fix: temp mpl deprec (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejnovak authored Sep 17, 2023
1 parent 1fcd5d9 commit cc45d29
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/mplhep/alice.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import inspect

from matplotlib import docstring
from matplotlib import _docstring as docstring

import mplhep

Expand Down
4 changes: 2 additions & 2 deletions src/mplhep/atlas.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
__all__ = ("style", "lumitext")


@mpl.docstring.copy(label_base.exp_text)
@mpl._docstring.copy(label_base.exp_text)
def text(text="", **kwargs):
for key, value in dict(mplhep.rcParams.text._get_kwargs()).items():
if (
Expand All @@ -29,7 +29,7 @@ def text(text="", **kwargs):
return label_base.exp_text("ATLAS", text=text, **kwargs)


@mpl.docstring.copy(label_base.exp_label)
@mpl._docstring.copy(label_base.exp_label)
def label(label=None, **kwargs):
for key, value in dict(mplhep.rcParams.label._get_kwargs()).items():
if (
Expand Down
2 changes: 1 addition & 1 deletion src/mplhep/cms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import inspect

from matplotlib import docstring
from matplotlib import _docstring as docstring

import mplhep

Expand Down
2 changes: 1 addition & 1 deletion src/mplhep/lhcb.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import inspect

from matplotlib import docstring
from matplotlib import _docstring as docstring

import mplhep
from mplhep import label as label_base
Expand Down
2 changes: 1 addition & 1 deletion tests/test_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test_inputs_bh_cat():
bh.axis.IntCategory(range(10)), bh.axis.StrCategory("", growth=True)
)

x = np.round(np.random.normal(5, 3, 1000))
x = np.round(np.random.normal(5, 3, 1000)).astype(int)
A, Z = np.array(["A", "Z"]).view("int32")
y = list(
np.random.randint(low=A, high=Z, size=1000, dtype="int32").view(f"U{1000}")[0]
Expand Down

0 comments on commit cc45d29

Please sign in to comment.