[vtkusers] pystrings
Chris Barker
Chris.Barker at noaa.gov
Mon Apr 11 14:58:51 EDT 2005
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?
I've only used Numeric, but there are similarities. Look for something like:
PyArray_FromDimsAndData(nd, dims, type, data)
but you need to make sure that the memory pointed to by data doesn't get
freed while the array still exists.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the vtkusers
mailing list