[IPython-User] Passing numpy masked arrays with apply
Fri Feb 1 03:27:26 CST 2013
Thanks for the info.
Den 31/01/2013 kl. 23.31 skrev MinRK <firstname.lastname@example.org>:
> On Thu, Jan 31, 2013 at 1:35 PM, Jesper Larsen <email@example.com> wrote:
>> Hi IPython users,
>> I am trying out the IPython parallel facilities. I need to pass a numpy masked array into a function using the apply_async view method. It seems however like it is converted to an ordinary numpy.ndarray when I do that:
>> import numpy as np
>> from IPython.parallel import Client
>> def foo(a):
>> return a
>> rc = Client()
>> dview = rc[:]
>> for i in range(3):
>> result = dview.apply_async(foo, np.ma.zeros((1)))
>> print type(result.get())
>> The type of the last print statement is numpy.ndarray. It should be a masked array.
>> Am I doing something wrong or is this a bug?
> There was an isinstance check that inappropriately caught ndarray subclasses. I believe this is fixed in master, if you want to check.
>> Best regards,
>> IPython-User mailing list
> IPython-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-User