Skip to content

BUG: lib: Handle axes with length 0 in np.unique.#15747

Merged
mattip merged 3 commits intonumpy:masterfrom
WarrenWeckesser:unique-with-zero-len
Mar 15, 2020
Merged

BUG: lib: Handle axes with length 0 in np.unique.#15747
mattip merged 3 commits intonumpy:masterfrom
WarrenWeckesser:unique-with-zero-len

Conversation

@WarrenWeckesser
Copy link
Copy Markdown
Member

@WarrenWeckesser WarrenWeckesser commented Mar 13, 2020

This PR is an alternative to gh-15565. It avoids the big block of special-case code in that PR.

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.

This if could probably do with a brief comment explaining why the special case is needed

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.

I pushed an update that added comments about this if statement. Copy-editing suggestions are welcome!

Copy link
Copy Markdown
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

This looks great, thanks for looking for a tidier solution

@WarrenWeckesser WarrenWeckesser changed the title BUG: lib: Handle axes with length 0 in np.unique. WIP/BUG: lib: Handle axes with length 0 in np.unique. Mar 13, 2020
@tylerjereddy
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@tylerjereddy
Copy link
Copy Markdown
Contributor

@seberg @WarrenWeckesser There's the reason--these comment triggers are pretty handy.

@tylerjereddy
Copy link
Copy Markdown
Contributor

@chrispat Any ideas here? We haven't changed our YML file recently.

@chrispat
Copy link
Copy Markdown

@vtbassmatt have there been any updates in path filtering?

@WarrenWeckesser
Copy link
Copy Markdown
Member Author

@tylerjereddy
Copy link
Copy Markdown
Contributor

Indeed, cross-linked SciPy PR above seems to fail at the moment too.

@vtbassmatt
Copy link
Copy Markdown

We're having an incident at the moment. Engineering is engaged.

@WarrenWeckesser WarrenWeckesser changed the title WIP/BUG: lib: Handle axes with length 0 in np.unique. BUG: lib: Handle axes with length 0 in np.unique. Mar 14, 2020
@WarrenWeckesser
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@mattip
Copy link
Copy Markdown
Member

mattip commented Mar 15, 2020

@vtbassmatt is there a place we can monitor progress on the incident?

@vtbassmatt
Copy link
Copy Markdown

huonw and others added 3 commits March 15, 2020 11:35
…th 0 axis.

This code is from github user huonw, from this PR:
    numpy#15565
Tweak a few lines so that arrays with an axis with length 0
don't break the np.unique code.

Closes numpygh-15559.
@mattip
Copy link
Copy Markdown
Member

mattip commented Mar 15, 2020

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mattip mattip merged commit 5b16107 into numpy:master Mar 15, 2020
@mattip
Copy link
Copy Markdown
Member

mattip commented Mar 15, 2020

Thanks @WarrenWeckesser

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.

7 participants