Lisandro Dalcin wrote:
>On 10/17/06, Travis Oliphant <[EMAIL PROTECTED]> wrote:
>
>
>>Or you can use the Python C-API
>>
>>const char *buffer;
>>Py_ssize_t buflen;
>>
>>PyObject_AsReadBuffer(scalar, (const void **)&buffer, &buflen)
>>
>>to retrieve a pointer to the data in buffer and the size of
On 10/17/06, Travis Oliphant <[EMAIL PROTECTED]> wrote:
> Or you can use the Python C-API
>
> const char *buffer;
> Py_ssize_t buflen;
>
> PyObject_AsReadBuffer(scalar, (const void **)&buffer, &buflen)
>
> to retrieve a pointer to the data in buffer and the size of the data in
> buflen.
>
Travis.
A Dimarts 17 Octubre 2006 18:22, Travis Oliphant va escriure:
> >2.- Fetch the buffer in scalartype.data and use the buffer protocol in
> > order to access the pointer to data in memory. However, I lack experience
> > in buffer protocol, so suggestions for achieving this are welcome.
>
> This will
Francesc Altet wrote:
>Hi,
>
>I'm looking for an easy way to access the data area of the numpy scalars no
>matter its type. I've seen that numpy/arrayscalars.h define a structure for
>each scalar type, so I'd guess that it will not be possible to find a general
>way for accessing the data buff
Hi,
I'm looking for an easy way to access the data area of the numpy scalars no
matter its type. I've seen that numpy/arrayscalars.h define a structure for
each scalar type, so I'd guess that it will not be possible to find a general
way for accessing the data buffer for each type. So, I've de