Skip to content

DEP: Deprecate as_strided returning a writable array as default - #7105

Merged
njsmith merged 1 commit into
numpy:masterfrom
seberg:writeable-as-strided
Feb 13, 2016
Merged

DEP: Deprecate as_strided returning a writable array as default#7105
njsmith merged 1 commit into
numpy:masterfrom
seberg:writeable-as-strided

Conversation

@seberg

@seberg seberg commented Jan 23, 2016

Copy link
Copy Markdown
Member

No description provided.

@seberg
seberg force-pushed the writeable-as-strided branch from a396123 to 2de30be Compare January 23, 2016 20:24
@seberg

seberg commented Jan 23, 2016

Copy link
Copy Markdown
Member Author

@jakirkham if you are interested in it, this would be the blue print for making the masked array warning relatively specific.

@njsmith

njsmith commented Jan 23, 2016

Copy link
Copy Markdown
Member

+1 to the concept, but should get a mailing list post I think -- or has it had one and I missed it?

@njsmith

njsmith commented Jan 23, 2016

Copy link
Copy Markdown
Member

BTW, I think we can remove diagonal from the warning message since it's been returning read-only views for a while now?

@seberg
seberg force-pushed the writeable-as-strided branch from 2de30be to 68c0ee6 Compare January 23, 2016 21:44
@seberg

seberg commented Jan 23, 2016

Copy link
Copy Markdown
Member Author

No idea, but that is your thing, so I trust you. Send an email and just removed the diagonal mention here....

@seberg

seberg commented Feb 13, 2016

Copy link
Copy Markdown
Member Author

Since there seemed to be some resistance on the mailing list, I opted with just doing adding a lengthy and scary documentation ;). If anyone finds this and is interested in the other solution (also because it gives blueprints for new "warn-on-write" stuff), the old version can be found here: https://github.com/seberg/numpy/tree/writeable-as-strided-warn-on-write

This now a simple doc change.

@seberg
seberg force-pushed the writeable-as-strided branch 3 times, most recently from 18add04 to 43afe9f Compare February 13, 2016 18:07
@njsmith

njsmith commented Feb 13, 2016

Copy link
Copy Markdown
Member

LGTM. Do you want to also add a writeable=True kwarg, so that we at least have the option eventually to nudge people to explicitly say writeable=False?

(Or possibly writable, but I guess that like referer the ship has sailed on that one...)

@seberg
seberg force-pushed the writeable-as-strided branch from 43afe9f to f7e64cc Compare February 13, 2016 21:26
@seberg

seberg commented Feb 13, 2016

Copy link
Copy Markdown
Member Author

Are you planning a spelling reform with writeable? ;) Anyway, added that since why not, if you already try to nudge people, make it at least easy.

@njsmith

njsmith commented Feb 13, 2016

Copy link
Copy Markdown
Member

"Writable" is the more standard spelling but flags uses writeable so oh well, consistency wins :-)

njsmith added a commit that referenced this pull request Feb 13, 2016
DEP: Deprecate as_strided returning a writable array as default
@njsmith
njsmith merged commit 26af0ce into numpy:master Feb 13, 2016
@njsmith

njsmith commented Feb 13, 2016

Copy link
Copy Markdown
Member

Thanks @seberg!

@seberg

seberg commented Feb 13, 2016

Copy link
Copy Markdown
Member Author

Seems my browser is set to UK english spell checking or something ;).

@charris

charris commented Feb 13, 2016

Copy link
Copy Markdown
Member

Should get a mention in the 1.12 release notes.

@seberg
seberg deleted the writeable-as-strided branch February 14, 2016 07:59
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