Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Remove usage of recarray#26687
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Remove usage of recarray#26687
Uh oh!
There was an error while loading.Please reload this page.
Conversation
75186cd
tod4599b4
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
(alternatively we could add this file to the flake8 config ignores)
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 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'snot 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. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
# Highlight gaps in daily data | ||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This one is a copy ofr
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) |
Structured numpy arrays are more fundamental than recarraysand sufficient in all cases.Supersedesmatplotlib#26664.
…687-on-v3.8.xBackport 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.