docstring polishing

This commit is contained in:
Martin Diehl 2022-01-29 23:16:57 +01:00
parent df96110733
commit 9ce4573b12
2 changed files with 22 additions and 16 deletions

View File

@ -786,9 +786,8 @@ class Grid:
Parameters Parameters
---------- ----------
directions : (sequence of) str directions : (sequence of) {'x', 'y', 'z'}
Direction(s) along which the grid is mirrored. Direction(s) along which the grid is mirrored.
Valid entries are 'x', 'y', 'z'.
reflect : bool, optional reflect : bool, optional
Reflect (include) outermost layers. Defaults to False. Reflect (include) outermost layers. Defaults to False.
@ -832,16 +831,14 @@ class Grid:
def flip(self, def flip(self,
directions: Union[Literal['x', 'y', 'z'], directions: Sequence[str]) -> 'Grid':
Sequence[Literal['x', 'y', 'z']]]) -> 'Grid':
""" """
Flip grid along given directions. Flip grid along given directions.
Parameters Parameters
---------- ----------
directions : (sequence of) str directions : (sequence of) {'x', 'y', 'z'}
Direction(s) along which the grid is flipped. Direction(s) along which the grid is flipped.
Valid entries are 'x', 'y', 'z'.
Returns Returns
------- -------
@ -1176,9 +1173,9 @@ class Grid:
---------- ----------
periodic : bool, optional periodic : bool, optional
Assume grid to be periodic. Defaults to True. Assume grid to be periodic. Defaults to True.
directions : (sequence of) string, optional directions : (sequence of) {'x', 'y', 'z'}, optional
Direction(s) along which the boundaries are determined. Direction(s) along which the boundaries are determined.
Valid entries are 'x', 'y', 'z'. Defaults to 'xyz'. Defaults to 'xyz'.
Returns Returns
------- -------

View File

@ -305,16 +305,20 @@ def project_equal_angle(vector: np.ndarray,
normalize : bool normalize : bool
Ensure unit length of input vector. Defaults to True. Ensure unit length of input vector. Defaults to True.
keepdims : bool keepdims : bool
Maintain three-dimensional output coordinates. Defaults to False. Maintain three-dimensional output coordinates.
Two-dimensional output uses right-handed frame spanned by Defaults to False.
the next and next-next axis relative to the projection direction,
e.g. x-y when projecting along z and z-x when projecting along y.
Returns Returns
------- -------
coordinates : numpy.ndarray, shape (...,2 | 3) coordinates : numpy.ndarray, shape (...,2 | 3)
Projected coordinates. Projected coordinates.
Notes
-----
Two-dimensional output uses right-handed frame spanned by
the next and next-next axis relative to the projection direction,
e.g. x-y when projecting along z and z-x when projecting along y.
Examples Examples
-------- --------
>>> import damask >>> import damask
@ -349,16 +353,21 @@ def project_equal_area(vector: np.ndarray,
normalize : bool normalize : bool
Ensure unit length of input vector. Defaults to True. Ensure unit length of input vector. Defaults to True.
keepdims : bool keepdims : bool
Maintain three-dimensional output coordinates. Defaults to False. Maintain three-dimensional output coordinates.
Two-dimensional output uses right-handed frame spanned by Defaults to False.
the next and next-next axis relative to the projection direction,
e.g. x-y when projecting along z and z-x when projecting along y.
Returns Returns
------- -------
coordinates : numpy.ndarray, shape (...,2 | 3) coordinates : numpy.ndarray, shape (...,2 | 3)
Projected coordinates. Projected coordinates.
Notes
-----
Two-dimensional output uses right-handed frame spanned by
the next and next-next axis relative to the projection direction,
e.g. x-y when projecting along z and z-x when projecting along y.
Examples Examples
-------- --------
>>> import damask >>> import damask