Skip to content

MAINT: Make void scalar to array creation copy when dtype is given - #16820

Merged
mattip merged 1 commit into
numpy:masterfrom
seberg:voidscalar-to-array
Jul 13, 2020
Merged

mattip merged 1 commit into
numpy:masterfrom
seberg:voidscalar-to-array

Conversation

@seberg

@seberg seberg commented Jul 12, 2020

Copy link
Copy Markdown
Member

This retains the old behaviour, where the non-copy semtantics
was only used when no dtype is passed in at all.


this is a small followup to gh-16200 simply because right now it slightly changed behaviour as it was.

This retains the old behaviour, where the non-copy semtantics
was only used when no dtype is passed in at all.
@charris

charris commented Jul 13, 2020

Copy link
Copy Markdown
Member

close/reopen

@charris charris closed this Jul 13, 2020
@charris charris reopened this Jul 13, 2020
@mattip

mattip commented Jul 13, 2020

Copy link
Copy Markdown
Member

LGTM. Shouldn't the title be "Make void scalar to array creation copy when no dtype is given"

@seberg

seberg commented Jul 13, 2020

Copy link
Copy Markdown
Member Author

The behaviour is to retain the view if there is only a scalar passed in, but do the copy when scalar+scalar.dtype is passed in.

@mattip
mattip merged commit c409143 into numpy:master Jul 13, 2020
@mattip

mattip commented Jul 13, 2020

Copy link
Copy Markdown
Member

Thanks @seberg

@seberg
seberg deleted the voidscalar-to-array branch July 13, 2020 14:46
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.

3 participants