What happens if you use
y=numpy.frombuffer(x) ?
//Torgil
On Sat, Dec 17, 2011 at 1:41 AM, Soeren Sonnenburg wrote:
> Hi,
>
> I've implemented the buffer protocol
> (http://www.python.org/dev/peps/pep-3118/) for some matrix class and
> when I manually call PyObject_GetBuffer on that object I se
> |6> y[np.argmin(y, axis=0), np.arange(y.shape[1])]
> array([0, 0, 0, 0, 0])
Can xrange in this case save me from creating a temporary array here
or doesn't it matter?
|6> y[np.argmin(y, axis=0), xrange(y.shape[1])]
array([0, 0, 0, 0, 0])
//Torgil
On Tue, Dec 13, 2011 at 11:27 PM, Robert Kern
Hi,
I've implemented the buffer protocol
(http://www.python.org/dev/peps/pep-3118/) for some matrix class and
when I manually call PyObject_GetBuffer on that object I see that I get
the right matrix.
Now I'd like to see numpy use the buffer protocol of my class. Does
anyone know how to test that?
On Fri, Dec 16, 2011 at 4:07 PM, McNicol, Adam wrote:
> **
>
> Hi There,
>
> I am very new to numpy and have really only started investigating it as
> one of my students needs some functionality from matplotlib. I have managed
> to install everything under Windows for work in class but I use a Mac
On Friday, December 16, 2011, McNicol, Adam wrote:
> Hi There,
>
> I am very new to numpy and have really only started investigating it as
one of my students needs some functionality from matplotlib. I have managed
to install everything under Windows for work in class but I use a Mac at
home and h
Hi There,
I am very new to numpy and have really only started investigating it as one of
my students needs some functionality from matplotlib. I have managed to install
everything under Windows for work in class but I use a Mac at home and have
been struggling all night to get it to build and i
On 12/16/2011 04:16 PM, Fabrice Silva wrote:
> Le vendredi 16 décembre 2011 à 15:33 +0100, Gregor Thalhammer a écrit :
>>> Even better: the addendum!
>>> http://blog.enthought.com/python/numpy/simplified-creation-of-numpy-arrays-from-pre-allocated-memory/
>>>
>>> Within cython:
>>> cimport numpy
>>
Le vendredi 16 décembre 2011 à 15:33 +0100, Gregor Thalhammer a écrit :
> > Even better: the addendum!
> > http://blog.enthought.com/python/numpy/simplified-creation-of-numpy-arrays-from-pre-allocated-memory/
> >
> > Within cython:
> > cimport numpy
> > numpy.set_array_base(my_ndarray, PyCObject_
Am 16.12.2011 um 11:53 schrieb Fabrice Silva:
> Le jeudi 15 décembre 2011 à 18:09 +0100, Gregor Thalhammer a écrit :
>
>> There is an excellent blog entry from Travis Oliphant, that describes
>> how to create a ndarray from existing data without copy:
>> http://blog.enthought.com/?p=62
>> The cr
Le jeudi 15 décembre 2011 à 18:09 +0100, Gregor Thalhammer a écrit :
> There is an excellent blog entry from Travis Oliphant, that describes
> how to create a ndarray from existing data without copy:
> http://blog.enthought.com/?p=62
> The created array does not actually own the data, but its base
10 matches
Mail list logo