from mpi4py import MPI
import numpy as np

comm = MPI.COMM_WORLD
rank = comm.Get_rank()

if rank == 0:
    data = np.array([1,2,4,5], dtype='int')
    comm.Send([data, MPI.INT], dest=1, tag=11)
elif rank == 1:
    #data=np.zeros(4, dtype='int')
    data = comm.Recv(source=0, tag=11)
    print(data)
