Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
QuLogic merged 1 commit intomatplotlib:mainfromtimhoffm:remove-recarray
Sep 14, 2023
Merged

Conversation

timhoffm
Copy link
Member

Structured numpy arrays are more fundamental than recarrays and sufficient in all cases.

Superseeds#26664.

@timhoffmtimhoffmforce-pushed theremove-recarray branch 2 times, most recently from75186cd tod4599b4CompareSeptember 4, 2023 01:17
# `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
Copy link
Member

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

Suggested change
# .. _structured numpy array: https://numpy.org/doc/stable/user/basics.rec.html#structured-arrays

Copy link
Member

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)

Copy link
MemberAuthor

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.

@QuLogic
Copy link
Member

Superseeds#26664.

Note, it's spelled 'supersedes', but also, it'snot one of the valid keywords if that's what you were intending.

@ksunden
Copy link
Member

Note, it's spelled 'supersedes'

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.


# 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)
Copy link
Member

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.

Suggested change
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.
@QuLogicQuLogic added this to thev3.8.0 milestoneSep 14, 2023
@QuLogicQuLogic merged commit8fdae3b intomatplotlib:mainSep 14, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestSep 14, 2023
QuLogic added a commit that referenced this pull requestSep 14, 2023
…687-on-v3.8.xBackport PR#26687 on branch v3.8.x (Remove usage of recarray)
@timhoffmtimhoffm deleted the remove-recarray branchSeptember 14, 2023 20:40
@ksundenksunden mentioned this pull requestSep 15, 2023
5 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ksundenksundenksunden left review comments

@QuLogicQuLogicQuLogic approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.8.0
Development

Successfully merging this pull request may close these issues.

3 participants
@timhoffm@QuLogic@ksunden

[8]ページ先頭

©2009-2025 Movatter.jp