[Numpy-discussion] Questions regarding migrating from Numeric to numpy

2007-03-14 Thread vinjvinj
I'm in the process of migrating from Numeric to numpy. In some of my code I have the following: a = zeros(num_elements, PyObject) b = zeros(num_elements, PyObject) a is an array of python string objects and b is an array holding mx.DateTime objects. What do I have to do to migrate this over to nu

[Numpy-discussion] Migrating from numeric to numpy

2007-03-14 Thread vinjvinj
So far my migration seems to be going well. I have one problem: I've been using the scipy_base.insert and scipy_base.extract functions and the behavior in numpy is not the same. a = [0, 0, 0, 0] mask = [0, 0, 0, 1] c = [10] numpy.insert(a, mask, c) would change a so that a = [0, 0, 0, 10] Thi