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

Skip to content

MNT/TST: remove xcorr and acorr from test_datetime #27427

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 3 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1979,6 +1979,8 @@ def acorr(self, x, **kwargs):
Parameters
----------
x : array-like
Not run through Matplotlib's unit conversion, so this should
be a unit-less array.

detrend : callable, default: `.mlab.detrend_none` (no detrending)
A detrending function applied to *x*. It must have the
Expand Down Expand Up @@ -2056,6 +2058,8 @@ def xcorr(self, x, y, normed=True, detrend=mlab.detrend_none,
Parameters
----------
x, y : array-like of length n
Neither *x* nor *y* are run through Matplotlib's unit conversion, so
these should be unit-less arrays.

detrend : callable, default: `.mlab.detrend_none` (no detrending)
A detrending function applied to *x* and *y*. It must have the
Expand Down
12 changes: 0 additions & 12 deletions lib/matplotlib/tests/test_datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@


class TestDatetimePlotting:
@pytest.mark.xfail(reason="Test for acorr not written yet")
@mpl.style.context("default")
def test_acorr(self):
fig, ax = plt.subplots()
ax.acorr(...)

@mpl.style.context("default")
def test_annotate(self):
mpl.rcParams["date.converter"] = 'concise'
Expand Down Expand Up @@ -738,9 +732,3 @@ def test_violinplot(self):
def test_vlines(self):
fig, ax = plt.subplots()
ax.vlines(...)

@pytest.mark.xfail(reason="Test for xcorr not written yet")
@mpl.style.context("default")
def test_xcorr(self):
fig, ax = plt.subplots()
ax.xcorr(...)