[SciPy-user] scipy.ndarray as Numeric array?

Giovanni Samaey giovanni.samaey at cs.kuleuven.ac.be
Thu Nov 10 08:29:04 CST 2005

Giovanni Samaey wrote:

Thanks for the help.  I have constructed a minimal example for people
who want to do the same as I did -- I made an error initially and solved it.

import scipy
import Numeric
import Scientific.MPI as MPI

mpi = MPI.world.duplicate()

glob = Numeric.zeros((mpi.size,1),Numeric.Int)
local = scipy.ones((1,),scipy.Int)


print glob

When I run this, I get (on every processor ;-) ):

File "test.py", line 10, in ?
Scientific.MPI.core.MPIError: send and receive arrays are not compatible

This is avoided by putting:

> Hi all,
> is it possible in some way to pass a scipy.ndarray as a Numeric array to
> other functions?
> I am using scipy together with mpipython and the mpi communication
> protocols there
> assume that what is being communicated is an array.
> How would I be able to perform a cast?
> (An unrelated question -- will there be integration of parallel
> programming tools in scipy in some
> future -- near or far? )
> Best, and thanks beforehand.
> Giovanni

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

More information about the SciPy-user mailing list