[Numpy-discussion] Make as_strided result writeonly

Juan Nunez-Iglesias jni.soma at gmail.com
Mon Jan 25 19:07:46 EST 2016


I agree that it's not ideal that the return value of as_strided is
writable. However, to be clear, this *would* break the API, which should
not happen between minor releases when using semantic versioning. Even with
a deprecation cycle, for libraries such as scikit-image that want to
maintain broad compatibility with multiple numpy versions, we would then
have to have some code to detect which version of numpy we're dealing with,
and do something different depending on the version. That's a big
development cost for something that has not been shown to cause any
problems.

And btw, although some people might use as_strided that aren't
super-amazing level 42 programmers, I would say that by that stage they are
probably comfortable enough to troubleshoot the shitstorm that's about to
fall on them. =P

On Tue, Jan 26, 2016 at 4:25 AM, Sturla Molden <sturla.molden at gmail.com>
wrote:

> On 25/01/16 18:06, Sebastian Berg wrote:
>
> That said, I guess I could agree with you in the regard that there are
>> so many *other* awful ways to use as_strided, that maybe it really is
>> just so bad, that improving one thing doesn't actually help anyway ;).
>>
>
> That is roughly my position on this, yes. :)
>
>
> Sturla
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> https://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20160126/97aeee11/attachment.html>


More information about the NumPy-Discussion mailing list