Skip to content

Commit

Permalink
Fix bugs in snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
jussienko committed May 25, 2020
1 parent a4d6e4b commit 1e6d713
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/mooc/parallel-programming/collectives-1-to-n.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ rank = comm.Get_rank()

if rank == 0:
py_data = {'key1' : 0.0, 'key2' : 11} # Python object
data = np.arange(8) / 10. # numpy array
data = numpy.arange(8) / 10. # numpy array
else:
py_data = None
data = np.zeros(8)
data = numpy.zeros(8)

new_data = comm.bcast(py_data, root=0)
comm.Bcast(data, root=0)
Expand Down
2 changes: 1 addition & 1 deletion docs/mooc/parallel-programming/collectives-n-to-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ received values:

~~~python
from mpi4py import MPI
from numpy import arange, empty
from numpy import arange, zeros

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

0 comments on commit 1e6d713

Please sign in to comment.