Message198890
| Author |
skrah |
| Recipients |
ncoghlan, pitrou, serhiy.storchaka, skrah, teoliphant |
| Date |
2013年10月03日.11:32:59 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1380799979.6.0.260147169313.issue19014@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|