[Numpy-discussion] a view of a numpy object array

2008-01-30 Thread YW
Hi, How would one deal with the problem of getting a view of a numpy object array? For example, In [49]: b Out[49]: TaskResultArray([[TaskResult[ID:0]:{'out': 22}, TaskResult[ID:1]: {'out': 22}, TaskResult[ID:2]:{'out': 16}, TaskResult[ID:3]:{'out': 16}, TaskResult[ID:4]:{'out': 1

[Numpy-discussion] a view of a numpy object array

2008-01-30 Thread YW
Hi, How would one deal with the problem of getting a view of a numpy object array? For example, In [49]: b Out[49]: TaskResultArray([[TaskResult[ID:0]:{'out': 22}, TaskResult[ID:1]: {'out': 22}, TaskResult[ID:2]:{'out': 16}, TaskResult[ID:3]:{'out': 16}, TaskResult[ID:4]:{'out': 1

Re: [Numpy-discussion] Vectorizing a function

2008-01-30 Thread YW
Try use a closure. On Jan 30, 12:49 am, LB <[EMAIL PROTECTED]> wrote: >    Hi, > > I've got some questions on the numpy.vectorize  function. > Currently, i'm doing this kind of work : > > [ code] > def calc_0d(x, y): >     """ make complexe calculation using two scalars x and y """ >     [ ... ] >