Re: [Numpy-discussion] Initializing array from buffer

2014-11-22 Thread Andrea Arteaga
Thanks everybody for suggesting many different ways to achieve this result. While all of them seem valid methods, I decided to use the constructor, as proposed by Robert: > The np.ndarray constructor takes a strides argument

Re: [Numpy-discussion] Initializing array from buffer

2014-11-17 Thread Andrea Arteaga
is a Numpy specific version of the buffer protocol, a bit simpler but less generic. It looks very easy to implement and clean. I will try this way. Thank you so much for the useful links. Andrea Arteaga 2014-11-17 18:08 GMT+01:00 Edison Gustavo Muenz : > Have you tried using the C-API to cre

[Numpy-discussion] Initializing array from buffer

2014-11-16 Thread Andrea Arteaga
Hello. Using the numpy.frombuffer function [1] one can initialize a numpy array using an existing python object that implements the buffer protocol [2]. This is great, but currently this function supports only 1D buffers, even if the provided buffer is multidimensional and it exposes all informatio