On Aug 22, 2011, at 7:35 AM, Mark Dickinson wrote:
> On Mon, Aug 22, 2011 at 1:30 PM, Stefan Krah
> wrote:
>> Numpy arrays and memoryview currently have different representations
>> for shape and strides if ndim = 0:
>>
> from numpy import *
> x = array(9, int32)
> x.ndim
>> 0
Mark Dickinson wrote:
> On Mon, Aug 22, 2011 at 1:30 PM, Stefan Krah
> wrote:
> > Numpy arrays and memoryview currently have different representations
> > for shape and strides if ndim = 0:
[...]
> > I think the Numpy representation is nicer. Also, I think that memoryviews
> > should attempt to
On Mon, Aug 22, 2011 at 1:30 PM, Stefan Krah wrote:
> Numpy arrays and memoryview currently have different representations
> for shape and strides if ndim = 0:
>
from numpy import *
x = array(9, int32)
x.ndim
> 0
x.shape
> ()
x.strides
> ()
m = memoryview(x)
m.nd
Hello,
Numpy arrays and memoryview currently have different representations
for shape and strides if ndim = 0:
>>> from numpy import *
>>> x = array(9, int32)
>>> x.ndim
0
>>> x.shape
()
>>> x.strides
()
>>> m = memoryview(x)
>>> m.ndim
0L
>>> m.shape is None
True
>>> m.strides is None
True
I t