Message198890
Ok, I think the main reason for disallowing zeros in view->shape here
was that casts are undefined if also the "shape" argument is given:
x = memoryview(b'')
x.cast('d', shape=[1])
Now, this case *is* already caught at a later stage, since there isn't
enough space for the cast. Nevertheless, the code is tricky, so I'd
prefer to be conservative and catch shape arguments earlier.
I left a suggestion in Rietveld. I would commit it myself, but I'm
moving and my infrastructure is a mess. It would be great if one
of you could take this one.
I'll try to review the general case for ndim > 1 later, but that's
not particularly important right now. |
|
Date |
User |
Action |
Args |
2013-10-03 11:32:59 | skrah | set | recipients:
+ skrah, teoliphant, ncoghlan, pitrou, serhiy.storchaka |
2013-10-03 11:32:59 | skrah | set | messageid: <1380799979.6.0.260147169313.issue19014@psf.upfronthosting.co.za> |
2013-10-03 11:32:59 | skrah | link | issue19014 messages |
2013-10-03 11:32:59 | skrah | create | |
|