Skip to content

Commit 4a94917

Browse files
committed
Fixing some docstrings
1 parent 9b1c802 commit 4a94917

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

mpi4py_fft/distributedarray.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -97,37 +97,37 @@ def __array_finalize__(self, obj):
9797

9898
@property
9999
def alignment(self):
100-
"""Return alignment of DistributedArray"""
100+
"""Return alignment of local ``self`` array"""
101101
return self._p0.axis
102102

103103
@property
104104
def global_shape(self):
105-
"""Return global shape of DistributedArray"""
105+
"""Return global shape of ``self``"""
106106
return self.shape[:self.rank] + self._p0.shape
107107

108108
@property
109109
def substart(self):
110-
"""Return starting indices of DistributedArray on this processor"""
110+
"""Return starting indices of local ``self`` array"""
111111
return (0,)*self.rank + self._p0.substart
112112

113113
@property
114114
def subcomm(self):
115-
"""Return tuple of subcommunicators for DistributedArray"""
115+
"""Return tuple of subcommunicators for all axes of ``self``"""
116116
return (MPI.COMM_SELF,)*self.rank + self._p0.subcomm
117117

118118
@property
119119
def commsizes(self):
120-
"""Return number of processors along each axis"""
120+
"""Return number of processors along each axis of ``self``"""
121121
return [s.Get_size() for s in self.subcomm]
122122

123123
@property
124124
def pencil(self):
125-
"""Return pencil describing distribution of DistributedArray"""
125+
"""Return pencil describing distribution of ``self``"""
126126
return self._p0
127127

128128
@property
129129
def rank(self):
130-
"""Return rank of DistributedArray"""
130+
"""Return rank of ``self``"""
131131
return self._rank
132132

133133
def __getitem__(self, i):
@@ -141,11 +141,11 @@ def __getitem__(self, i):
141141

142142
@property
143143
def v(self):
144-
""" Return ``self`` as an ``ndarray`` object"""
144+
""" Return local ``self`` array as an ``ndarray`` object"""
145145
return self.__array__()
146146

147147
def get_global_slice(self, gslice):
148-
"""Return global slice of DistributedArray
148+
"""Return global slice of ``self``
149149
150150
Parameters
151151
----------
@@ -206,13 +206,13 @@ def get_global_slice(self, gslice):
206206
return c
207207

208208
def local_slice(self):
209-
"""Local view into global array
209+
"""Return local view into global ``self`` array
210210
211211
Returns
212212
-------
213213
List of slices
214214
Each item of the returned list is the slice along that axis,
215-
describing the view of the current array into the global array.
215+
describing the view of the ``self`` array into the global array.
216216
217217
Example
218218
-------
@@ -243,7 +243,7 @@ def local_slice(self):
243243
return [slice(0, s) for s in self.shape[:self.rank]] + v
244244

245245
def get_pencil_and_transfer(self, axis):
246-
"""Return new pencil and transfer object for alignment in ``axis``
246+
"""Return pencil and transfer objects for alignment along ``axis``
247247
248248
Parameters
249249
----------
@@ -261,21 +261,21 @@ def get_pencil_and_transfer(self, axis):
261261
return p1, self._p0.transfer(p1, self.dtype)
262262

263263
def redistribute(self, axis=None, darray=None):
264-
"""Global redistribution of array ``self``
264+
"""Global redistribution of local ``self`` array
265265
266266
Parameters
267267
----------
268268
axis : int, optional
269-
Align ``self`` array along this axis
270-
darray : DistributedArray, optional
269+
Align local ``self`` array along this axis
270+
darray : :class:`.DistributedArray`, optional
271271
Copy data to this array of possibly different alignment
272272
273273
Returns
274274
-------
275-
DistributedArray : darray
276-
The ``self`` array globally redistributed. If ``darray`` is None
277-
then a new DistributedArray (aligned along ``axis``) is created and
278-
returned
275+
:class:`.DistributedArray` : darray
276+
The ``self`` array globally redistributed. If keyword ``darray`` is
277+
None then a new DistributedArray (aligned along ``axis``) is created
278+
and returned
279279
"""
280280
if axis is None:
281281
assert isinstance(darray, np.ndarray)
@@ -292,11 +292,11 @@ def redistribute(self, axis=None, darray=None):
292292
return darray
293293

294294
def newDarray(pfft, forward_output=True, val=0, rank=0, view=False):
295-
"""Return DistributedArray for instance of PFFT class
295+
"""Return a :class:`.DistributedArray` for provided :class:`.PFFT` object
296296
297297
Parameters
298298
----------
299-
pfft : Instance of :class:`.PFFT` class
299+
pfft : :class:`.PFFT` object
300300
forward_output: boolean, optional
301301
If False then create newDarray of shape/type for input to
302302
forward transform, otherwise create newDarray of shape/type for

0 commit comments

Comments
 (0)