Skip to content

BUG: Fix structured_to_unstructured on single-field types - #13334

Merged
mattip merged 3 commits into
numpy:masterfrom
eric-wieser:fix-1-field-unstructured
Apr 25, 2019
Merged

mattip merged 3 commits into
numpy:masterfrom
eric-wieser:fix-1-field-unstructured

Conversation

@eric-wieser

Copy link
Copy Markdown
Member

Previously a single-field type would decay, which is undesirable.

The included test previously did not pass

Comment thread numpy/lib/recfunctions.py Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is a strong argument for why #13326 is a good idea

Comment thread numpy/lib/tests/test_recfunctions.py Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Previously returned the scalar 5.5

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If someone actually wants the result 5.5, they should just have been using np.mean(b['x'], axis=-1)

Previously a single-field type would decay, which is undesirable.

The included test previously did not pass
@eric-wieser
eric-wieser force-pushed the fix-1-field-unstructured branch from 7b4dd63 to b5895be Compare April 16, 2019 05:27
@eric-wieser

Copy link
Copy Markdown
Member Author

Rebased for ease of backporting.

@charris

charris commented Apr 16, 2019

Copy link
Copy Markdown
Member

@ahaldane Thoughts?

@ahaldane

Copy link
Copy Markdown
Member

Just got to this. Yes, it seems like the right change to make.

I think it is worth a release note since it is technically a backward incompatible change. I just hope no one has depended on this yet! (seems unlikely since it a new function).

After that, LGTM, I'd be happy to merge.

@eric-wieser eric-wieser added the 56 - Needs Release Note. Needs an entry in doc/release/upcoming_changes label Apr 22, 2019
@ahaldane

Copy link
Copy Markdown
Member

Oh I see, you are planning to put it in 1.16.3. In that case we can just go ahead and merge right?

@eric-wieser

Copy link
Copy Markdown
Member Author

If its not too late to put in 1.16.3...

@ahaldane

Copy link
Copy Markdown
Member

Oh sorry, I was away the last week so may have caused the cutoff date to be missed. It would be nice to get it in 1.16.3...

@eric-wieser

eric-wieser commented Apr 23, 2019 •

Copy link
Copy Markdown
Member Author

@charris, this should get 1.17.0 / 1.16.4 notes I assume?

@eric-wieser

Copy link
Copy Markdown
Member Author

Note that our release notes for 1.16.0 barely mention structured_to_unstructured in any detail.

think it is worth a release note since it is technically a backward incompatible change

Every bug fix is a backwards-incompatible change for those depending on it. I'd perhaps argue that the changelog is sufficient here, but will let @charris arbitrate.

@charris

charris commented Apr 23, 2019

Copy link
Copy Markdown
Member

this should get 1.17.0 / 1.16.4 notes I assume?

Just 1.17.0, then do 1.16.4 for the backport. Note that there is no 1.17.0 in 1.16.x, so the file will need removal.

@eric-wieser

Copy link
Copy Markdown
Member Author

Updated with a 1.17 release note, 1.16 release note created in #13396

@mattip mattip removed the 56 - Needs Release Note. Needs an entry in doc/release/upcoming_changes label Apr 25, 2019
@mattip
mattip merged commit 171a3e5 into numpy:master Apr 25, 2019
@mattip

mattip commented Apr 25, 2019

Copy link
Copy Markdown
Member

Thanks Eric

@charris charris added component: numpy.lib and removed 09 - Backport-Candidate PRs tagged should be backported labels May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants