GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||
GeezerVison is showing github.com — BUG: automatically convert recarray dtype to np.record by ahaldane · Pull Request #5943 · numpy/numpy Conversation
Member
As discussed in #3581, this PR automatically converts the dtype of To get unit tests to pass I also had to add a setattr to the MaskedArray.setattr now catches assignments to dtype and updates the mask accordingly. Possible issues with this PR, if anyone has any ideas:
Benefits:
I still need to finish writing unit tests
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
ahaldane
force-pushed
the
record_finalize
branch
4 times, most recently
from
bf2597f to
742801f
Compare
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
ahaldane
force-pushed
the
record_finalize
branch
from
dc5161c to
73bb3e1
Compare
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This was referenced
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ahaldane - In principle, at this point
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I expanded the comment, but I still have to use
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
ahaldane
force-pushed
the
record_finalize
branch
from
73bb3e1 to
cfd3dac
Compare
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
ahaldane
force-pushed
the
record_finalize
branch
from
cfd3dac to
f8b5308
Compare
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ahaldane - it should be: I think this is just a problem with your
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe I'm being too clever, but I think we want the dtype to be set to This prints out (left is your if, right is my if) I think the right is what I want. Is that correct?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, if you need it to be set also for explicit construction then, yes, your case is the right one. Since this was not obvious to me, and therefore may not be obvious to a future person looking at the code, maybe write the comment as:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
ahaldane
force-pushed
the
record_finalize
branch
from
f8b5308 to
867ed71
Compare
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
ahaldane
force-pushed
the
record_finalize
branch
from
867ed71 to
698a8d2
Compare
Viewing an ndarray as a np.recarray now automatically converts the dtype to np.record. This commit also fixes assignment to MaskedArray's dtype attribute, fixes the repr of recarrays with non-structured dtype, and removes recarray.view so that viewing a recarray as a non-structured dtype no longer converts to ndarray type. Fixes numpy#3581
ahaldane
force-pushed
the
record_finalize
branch
from
698a8d2 to
a93b862
Compare
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
charris
added a commit
that referenced
this pull request
BUG: automatically convert recarray dtype to np.record
Member
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
ahaldane
added a commit
to ahaldane/numpy
that referenced
this pull request
Record array views were updated in numpy#5943 to return np.record dtype where possible, but forgot about the case of sub-arrays. That's fixed here, so accessing subarray fields by attribute or index works sensibly, as well as viewing a record array as a subarray dtype, and printing subarrays. This also happens to fix numpy#6459, since it affects the same lines. Fixes numpy#6497 numpy#6459
charris
pushed a commit
to charris/numpy
that referenced
this pull request
Record array views were updated in numpy#5943 to return np.record dtype where possible, but forgot about the case of sub-arrays. That's fixed here, so accessing subarray fields by attribute or index works sensibly, as well as viewing a record array as a subarray dtype, and printing subarrays. This also happens to fix numpy#6459, since it affects the same lines. Fixes numpy#6497 numpy#6459
jaimefrio
pushed a commit
to jaimefrio/numpy
that referenced
this pull request
Record array views were updated in numpy#5943 to return np.record dtype where possible, but forgot about the case of sub-arrays. That's fixed here, so accessing subarray fields by attribute or index works sensibly, as well as viewing a record array as a subarray dtype, and printing subarrays. This also happens to fix numpy#6459, since it affects the same lines. Fixes numpy#6497 numpy#6459
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | |||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |