Skip to content

Commit 7a06d67

Browse files
committed
doc: minor changes to README
1 parent c6bc80b commit 7a06d67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ and running the following command:
3838

3939
with `X=11,12`.
4040

41-
Alternatively, if the Conda package manager is used to setup the Python environment, steps 1 and 2 can be skipped and install `mpi4py` which comes with its own MPI distribution:
41+
Alternatively, if the Conda package manager is used to setup the Python environment, steps 1 and 2 can be skipped and `mpi4py` can be installed directly alongside the MPI distribution of choice:
4242

4343
```
4444
conda install -c conda-forge mpi4py X
@@ -70,11 +70,11 @@ via the `DistributedArray` object:
7070
import numpy as np
7171
from pylops_mpi import DistributedArray, Partition
7272

73+
# Initialize DistributedArray with partition set to Scatter
7374
nx, ny = 11, 21
7475
x = np.zeros((nx, ny), dtype=np.float64)
7576
x[nx // 2, ny // 2] = 1.0
7677

77-
# Initialize DistributedArray with partition set to Scatter
7878
x_dist = pylops_mpi.DistributedArray.to_dist(
7979
x=x.flatten(),
8080
partition=Partition.SCATTER)
@@ -83,7 +83,7 @@ x_dist = pylops_mpi.DistributedArray.to_dist(
8383
D_op = pylops_mpi.MPIFirstDerivative((nx, ny), dtype=np.float64)
8484

8585
# y = Dx
86-
y_dist = D_op @ x
86+
y_dist = D_op @ x_dist
8787

8888
# xadj = D^H y
8989
xadj_dist = D_op.H @ y_dist

0 commit comments

Comments
 (0)