Re: [Numpy-discussion] xml-rpc with numpy arrays

2008-10-01 Thread Vincent Schut
Lisandro Dalcin wrote: I believe xmlrpclib is currently the simpler approach. Some day I'll have the time to implement something similar using MPI communication with mpi4py. However, I believe it can be done even better: local, client-side proxies should automatically provide access to all

Re: [Numpy-discussion] xml-rpc with numpy arrays

2008-10-01 Thread Brian Blais
On Sep 30, 2008, at 23:16 , Lisandro Dalcin wrote: On Tue, Sep 30, 2008 at 9:27 PM, Brian Blais [EMAIL PROTECTED] thanks for all of the help. My initial solution is to pickle my object, with the text-based version of pickle, and send it across rpc. I do this because the actual thing I am

[Numpy-discussion] xml-rpc with numpy arrays

2008-09-30 Thread Brian Blais
Hello, I am trying to use xml-rpc to be able to run some simulations remotely. I am running into a problem with the transfer of numpy arrays. my server code looks like: #!/usr/bin/env python def again(x): # test out the sending of data return [x,x] from SimpleXMLRPCServer import

Re: [Numpy-discussion] xml-rpc with numpy arrays

2008-09-30 Thread Uwe Schmitt
Hi, in order to marshal numpy arrays, you can use the tostring() method. The inverse is the fromstring() function in numpy. But you must know dtype and shape in order to reconstruct your array. Greetings, Uwe On 30 Sep., 19:53, Brian Blais [EMAIL PROTECTED] wrote: Hello, I am trying to use

Re: [Numpy-discussion] xml-rpc with numpy arrays

2008-09-30 Thread Robert Kern
On Tue, Sep 30, 2008 at 12:53, Brian Blais [EMAIL PROTECTED] wrote: Hello, I am trying to use xml-rpc to be able to run some simulations remotely. I am running into a problem with the transfer of numpy arrays. my server code looks like: #!/usr/bin/env python def again(x): # test out the

Re: [Numpy-discussion] xml-rpc with numpy arrays

2008-09-30 Thread Lisandro Dalcin
Sebastien, numpy arrays are picklable; so no need to register them with copy_reg. I believe the actual problem with xmlrpclib is that it uses the marshal protocol (only supports core builtin types), and not the pickle protocol. On Tue, Sep 30, 2008 at 5:18 PM, Sebastien Binet [EMAIL PROTECTED]

Re: [Numpy-discussion] xml-rpc with numpy arrays

2008-09-30 Thread Sebastien Binet
Lisandro, On Tuesday 30 September 2008 15:24:56 Lisandro Dalcin wrote: Sebastien, numpy arrays are picklable; so no need to register them with copy_reg. I believe the actual problem with xmlrpclib is that it uses the marshal protocol (only supports core builtin types), and not the pickle

Re: [Numpy-discussion] xml-rpc with numpy arrays

2008-09-30 Thread Brian Blais
On Sep 30, 2008, at 18:42 , Sebastien Binet wrote: yeah... Robert pointed it to me that as xmlrpc is meant for cross- language RPC, sending python objects over the wire isn't so useful, hence the usage of marshal instead of pickle. thanks for all of the help. My initial solution is to

Re: [Numpy-discussion] xml-rpc with numpy arrays

2008-09-30 Thread Sebastien Binet
Brian, On Tuesday 30 September 2008 17:27:32 Brian Blais wrote: On Sep 30, 2008, at 18:42 , Sebastien Binet wrote: yeah... Robert pointed it to me that as xmlrpc is meant for cross- language RPC, sending python objects over the wire isn't so useful, hence the usage of marshal instead

Re: [Numpy-discussion] xml-rpc with numpy arrays

2008-09-30 Thread Lisandro Dalcin
On Tue, Sep 30, 2008 at 9:27 PM, Brian Blais [EMAIL PROTECTED] thanks for all of the help. My initial solution is to pickle my object, with the text-based version of pickle, and send it across rpc. I do this because the actual thing I am sending is a dictionary, with lots of arrays, and