Skip to content

FIX: base always refers to the original subclass - #2746

Merged
certik merged 3 commits into
numpy:masterfrom
GaelVaroquaux:fix-470
Dec 4, 2012
Merged

certik merged 3 commits into
numpy:masterfrom
GaelVaroquaux:fix-470

Conversation

@GaelVaroquaux

Copy link
Copy Markdown
Contributor

Closes #470

The use case is that if b is a memmap, 'np.asarray(b).base' should be a
memmap, and thus we put is to b in such a situation.

Closes numpy#470

The use case is that if b is a memmap, 'np.asarray(b).base' should be a
memmap, and thus we put is to b in such a situation.
@ogrisel

ogrisel commented Nov 15, 2012

Copy link
Copy Markdown
Contributor

That branch seems to fix the originally reported issue. Thanks!

Comment thread numpy/core/src/multiarray/arrayobject.c Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment has a grammar issue. Can you fix / rephrase?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just inserting "when the" before "new base".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just inserting "when the" before "new base".

Done, thanks.

Comment thread numpy/core/src/multiarray/arrayobject.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your whitespace has gone wonky here (some tab problem perhaps)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your whitespace has gone wonky here (some tab problem perhaps)

Oops, sorry, messed up with my editor. Fixed

@njsmith

njsmith commented Nov 15, 2012

Copy link
Copy Markdown
Member

I haven't thought about this change carefully, but since we're talking about band-aid workarounds and the people who need the band-aid like it, I figure it's fine... and it still does collapse simple base chains, so the original bug should remain fixed.

@ogrisel

ogrisel commented Nov 16, 2012

Copy link
Copy Markdown
Contributor

I don't think the travis failure is related to this pull request:

https://travis-ci.org/numpy/numpy/jobs/3212012

Maybe an heisentest?

@GaelVaroquaux

Copy link
Copy Markdown
Contributor Author

On Fri, Nov 16, 2012 at 01:39:25AM -0800, Olivier Grisel wrote:

I don't think the travis failure is related to this pull request:

https://travis-ci.org/numpy/numpy/jobs/3212012

I think so too, as I didn't change anything relevent compared to the
previous commit, in which tests passed:

https://travis-ci.org/numpy/numpy/builds/3211594

@certik

certik commented Nov 16, 2012

Copy link
Copy Markdown
Contributor

The failure is fixed by #2745. Gael, would you mind reviewing that PR for me please?

As to this PR, it looks ok to me. @teoliphant, if you have a minute, would you mind checking it too, since you wrote the initial PR for this?

@ogrisel

ogrisel commented Nov 24, 2012

Copy link
Copy Markdown
Contributor

Anybody else to review this fix before merging it to master?

@embray

embray commented Dec 4, 2012

Copy link
Copy Markdown
Contributor

Works for me--this fixed a bug that was occurring in astropy/astropy#495.

@certik

certik commented Dec 4, 2012

Copy link
Copy Markdown
Contributor

Since this fixes it, I am merging it. @GaelVaroquaux I think this should be backported to 1.7.x, correct?

certik added a commit that referenced this pull request Dec 4, 2012
FIX: base always refers to the original subclass
@certik
certik merged commit d8370da into numpy:master Dec 4, 2012
@certik certik mentioned this pull request Dec 4, 2012
@GaelVaroquaux

Copy link
Copy Markdown
Contributor Author

@GaelVaroquaux I think this should be backported to 1.7.x, correct?

Yes, I believe so. Thanks!

certik added a commit that referenced this pull request Dec 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mmap objects used in base should expose a filename attribute

5 participants