[vtkusers] pystrings

Prabhu Ramachandran prabhu_r at users.sf.net
Mon Apr 11 13:51:30 EDT 2005


>>>>> "Ross" == rharder  <rharder at uiuc.edu> writes:

    Ross> Thanks Prabhu, I've never been able to come to grips with
    Ross> the numarray c api.  I use static PyObject*
    Ross> NA_vNewArray(void *buffer, NumarrayType type, int ndim,
    Ross> maybelong *shape) to get my double* data into python
    Ross> numarrays.  This function also creates a copy of the buffer.
    Ross> How should I be doing this?

Sorry, I think I misunderstood your question.  I thought you needed to
do this from the Python side?  I am not familiar with the Numarray C
API either.  You can grab the pointer to the data stored in a VTK data
array.  Then if you can figure a way to use that to create the
numarray you should be set but I don't know of a numarray function to
do that off-hand.

cheers,
prabhu



More information about the vtkusers mailing list