This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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.
History
Date User Action Args
2013-10-03 11:32:59skrahsetrecipients: + skrah, teoliphant, ncoghlan, pitrou, serhiy.storchaka
2013-10-03 11:32:59skrahsetmessageid: <1380799979.6.0.260147169313.issue19014@psf.upfronthosting.co.za>
2013-10-03 11:32:59skrahlinkissue19014 messages
2013-10-03 11:32:59skrahcreate