Skip to content

MAINT: Collect together the special-casing of 0d nonzero into one place - #13632

Merged
mattip merged 2 commits into
numpy:masterfrom
eric-wieser:tidy-nonzero
Jun 3, 2019
Merged

mattip merged 2 commits into
numpy:masterfrom
eric-wieser:tidy-nonzero

Conversation

@eric-wieser

@eric-wieser eric-wieser commented May 26, 2019 •

Copy link
Copy Markdown
Member

Brought on by #13522, in an attempt to make it clear why this happens.

Will follow up with a PR suggesting a deprecation (edit: #13708)

@mattip

mattip commented May 31, 2019

Copy link
Copy Markdown
Member

Fails to compile cleanly:

 numpy/core/src/multiarray/item_selection.c:2220:16: warning: passing argument 4 of ‘PyArray_NewFromDescrAndBase’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  numpy/core/src/multiarray/item_selection.c:2220:32: warning: passing argument 5 of ‘PyArray_NewFromDescrAndBase’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  numpy/core/src/multiarray/item_selection.c:2210:9: warning: unused variable ‘is_empty’ [-Wunused-variable]

@eric-wieser
eric-wieser force-pushed the tidy-nonzero branch 3 times, most recently from a93fdb4 to a178733 Compare June 1, 2019 08:51
@eric-wieser

eric-wieser commented Jun 1, 2019 •

Copy link
Copy Markdown
Member Author

Unfortunately my windows builds don't emit any warnings about incorrect usage of const, so this is requiring a lot of CI hits.

Will probably split out the const-ness into a separate PR once this passes (edit: #13693)

@mattip
mattip merged commit 40ada70 into numpy:master Jun 3, 2019
@mattip

mattip commented Jun 3, 2019

Copy link
Copy Markdown
Member

Nice cleanup, thanks Eric

@eric-wieser eric-wieser changed the title MAINT: Collect together the special-casing of 0d non-zero into one place MAINT: Collect together the special-casing of 0d nonzero into one place Jun 4, 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.

2 participants