Conversation
75186cd to
d4599b4
Compare
| # `pandas.DataFrame`. Matplotlib allows you to provide the ``data`` keyword argument | ||
| # and generate plots passing the strings corresponding to the *x* and *y* variables. | ||
| # | ||
| # .. _structured numpy array: https://numpy.org/doc/stable/user/basics.rec.html#structured-arrays |
There was a problem hiding this comment.
This link is in-lined above and causing a flake8 flag
| # .. _structured numpy array: https://numpy.org/doc/stable/user/basics.rec.html#structured-arrays |
There was a problem hiding this comment.
(alternatively we could add this file to the flake8 config ignores)
There was a problem hiding this comment.
I don't want to except the whole file from flake8. That's why I've inlined the links. Alternatively, we could use an inline comment # noqa: E501 on the links, which we generally don't do, but seems ok in this case.
Note, it's spelled 'supersedes', but also, it's not one of the valid keywords if that's what you were intending. |
This always gets me, too, though I tend to think it should be spelled "supercedes" as in "cause the other one to cede to it"... or as opposed to "precede" etc. |
d4599b4 to
23ed61b
Compare
| gaps = np.flatnonzero(np.diff(r.date) > np.timedelta64(1, 'D')) | ||
| gaps = np.flatnonzero(np.diff(r["date"]) > np.timedelta64(1, 'D')) | ||
| for gap in r[['date', 'adj_close']][np.stack((gaps, gaps + 1)).T]: | ||
| ax1.plot(gap.date, gap.adj_close, 'w--', lw=2) |
There was a problem hiding this comment.
This one is a copy of r that hasn't been changed.
| ax1.plot(gap.date, gap.adj_close, 'w--', lw=2) | |
| ax1.plot(gap['date'], gap['adj_close'], 'w--', lw=2) |
23ed61b to
c3f72c5
Compare
Structured numpy arrays are more fundamental than recarrays and sufficient in all cases. Supersedes matplotlib#26664.
c3f72c5 to
4c14bd0
Compare
…687-on-v3.8.x Backport PR #26687 on branch v3.8.x (Remove usage of recarray)
Structured numpy arrays are more fundamental than recarrays and sufficient in all cases.
Superseeds #26664.