[Numpy-discussion] seeking advice on a fast string->array conversion

Pauli Virtanen pav at iki.fi
Tue Nov 16 09:55:31 EST 2010


Tue, 16 Nov 2010 09:41:04 -0500, Darren Dale wrote:
[clip]
> That loop takes 0.33 seconds to execute, which is a good start. I need
> some help converting this example to return an actual numpy array. Could
> anyone please offer a suggestion?

Easiest way is probably to use ndarray buffers and resize them when 
needed. For example:

https://github.com/pv/scipy-work/blob/enh/interpnd-smooth/scipy/spatial/qhull.pyx#L980




More information about the NumPy-Discussion mailing list