Re: [Cython] Can't assign numpy array to memoryview

2014-12-08 Thread Dave Hirschfeld
Dave Hirschfeld writes: > > It appears that you can't assign an ndarray to a memoryview slice? Is > this correct/expected behaviour? > > Whilst there are a couple of possible workarounds it would be nice if > this just worked as it's a slightly surprising deviation from the > ndarray behavio

[Cython] Can't assign numpy array to memoryview

2014-12-08 Thread Dave Hirschfeld
It appears that you can't assign an ndarray to a memoryview slice? Is this correct/expected behaviour? Whilst there are a couple of possible workarounds it would be nice if this just worked as it's a slightly surprising deviation from the ndarray behaviour. Broken example: ``` In [3]: %%cython