[IPython-User] Passing numpy masked arrays with apply
Thu Jan 31 16:31:16 CST 2013
On Thu, Jan 31, 2013 at 1:35 PM, Jesper Larsen <firstname.lastname@example.org>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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-User