-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Conversation
6a16664
to
99fab6a
Compare
If we claim to support it, i.e. this participates in units, then it should probably be tested. Also timedeltas are common for these https://online.stat.psu.edu/stat462/node/188/ |
Xcorr and acorr do not participate in units. Both work by assuming x and y are spaced equally in time (or space). You can of course assign units to the lags, but we do not try to do this in xcorr/acorr. |
It might be good to generate a table of what participates in units and what doesn't, possibly added either to https://matplotlib.org/devdocs/users/explain/axes/axes_units.html#more-about-unit-support or https://matplotlib.org/devdocs/api/units_api.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that these should be removed. Some formatting, although I think that this probably should not go on the same line. Maybe better to add it on the next line? Or as an admonition?
lib/matplotlib/axes/_axes.py
Outdated
@@ -2055,7 +2056,9 @@ def xcorr(self, x, y, normed=True, detrend=mlab.detrend_none, | |||
|
|||
Parameters | |||
---------- | |||
x, y : array-like of length n | |||
x, y : array-like of length n. Neither x nor y are run through |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x, y : array-like of length n. Neither x nor y are run through | |
x, y : array-like of length n. Neither *x* nor *y* are run through |
07ed125
to
1f37e49
Compare
1f37e49
to
cb5463d
Compare
cb5463d
to
403873f
Compare
2b26a0a
to
7cfd688
Compare
Currently
xcorr
andacorr
are intest_datetimes.py
. However, I think it is highly unlikely anyone would want to pass datetimes in asx
values to either of these methods. It is also not clear what giving the unit conversion means for these arguments. Modified the docstrings to make this clear.