Merge branch '221-docstring-unification' into 'development'
unify X or list/seq/collection of X --> (A/B/C of) X in docstrings Closes #221 See merge request damask/DAMASK!653
This commit is contained in:
commit
465ee7c5e5
|
@ -248,7 +248,7 @@ class Colormap(mpl.colors.ListedColormap):
|
|||
|
||||
Parameters
|
||||
----------
|
||||
fraction : float or sequence of float
|
||||
fraction : (sequence of) float
|
||||
Fractional coordinate(s) to evaluate Colormap at.
|
||||
|
||||
Returns
|
||||
|
|
|
@ -50,7 +50,7 @@ class Grid:
|
|||
Coordinates of grid origin in meter. Defaults to [0.0,0.0,0.0].
|
||||
initial_conditions : dictionary, optional
|
||||
Labels and values of the inital conditions at each material point.
|
||||
comments : str or sequence of str, optional
|
||||
comments : (sequence of) str, optional
|
||||
Additional, human-readable information, e.g. history of operations.
|
||||
|
||||
"""
|
||||
|
@ -427,7 +427,7 @@ class Grid:
|
|||
coordinates : str
|
||||
Label of the vector column containing the spatial coordinates.
|
||||
Need to be ordered (1./x fast, 3./z slow).
|
||||
labels : str or sequence of str
|
||||
labels : (sequence of) str
|
||||
Label(s) of the columns containing the material definition.
|
||||
Each unique combination of values results in one material ID.
|
||||
|
||||
|
@ -1043,9 +1043,9 @@ class Grid:
|
|||
|
||||
Parameters
|
||||
----------
|
||||
from_material : int or sequence of int
|
||||
from_material : (sequence of) int
|
||||
Material indices to be substituted.
|
||||
to_material : int or sequence of int
|
||||
to_material : (sequence of) int
|
||||
New material indices.
|
||||
|
||||
Returns
|
||||
|
@ -1104,7 +1104,7 @@ class Grid:
|
|||
distance : float, optional
|
||||
Voxel distance checked for presence of other materials.
|
||||
Defaults to sqrt(3).
|
||||
selection : int or collection of int, optional
|
||||
selection : (collection of) int, optional
|
||||
Material IDs to consider. Defaults to all.
|
||||
invert_selection : bool, optional
|
||||
Consider all material IDs except those in selection. Defaults to False.
|
||||
|
@ -1179,7 +1179,7 @@ class Grid:
|
|||
Center of the primitive.
|
||||
If given as integers, cell centers are addressed.
|
||||
If given as floats, physical coordinates are addressed.
|
||||
exponent : float or sequence of float, len (3)
|
||||
exponent : (sequence of) float, len (3)
|
||||
Exponents for the three axes.
|
||||
0 gives octahedron (ǀxǀ^(2^0) + ǀyǀ^(2^0) + ǀzǀ^(2^0) < 1)
|
||||
1 gives sphere (ǀxǀ^(2^1) + ǀyǀ^(2^1) + ǀzǀ^(2^1) < 1)
|
||||
|
@ -1271,7 +1271,7 @@ class Grid:
|
|||
offset : int, optional
|
||||
Offset (positive or negative) to tag material IDs.
|
||||
Defaults to material.max()+1.
|
||||
selection : int or collection of int, optional
|
||||
selection : (collection of) int, optional
|
||||
Material IDs that trigger an offset.
|
||||
Defaults to any other than own material ID.
|
||||
invert_selection : bool, optional
|
||||
|
|
|
@ -468,7 +468,7 @@ class Rotation:
|
|||
|
||||
Parameters
|
||||
----------
|
||||
shape : int or sequence of ints
|
||||
shape : (sequence of) int
|
||||
New shape, number of elements needs to match the original shape.
|
||||
If an integer is supplied, then the result will be a 1-D array of that length.
|
||||
order : {'C', 'F', 'A'}, optional
|
||||
|
@ -496,7 +496,7 @@ class Rotation:
|
|||
|
||||
Parameters
|
||||
----------
|
||||
shape : int or sequence of ints
|
||||
shape : (sequence of) int
|
||||
Shape of broadcasted array, needs to be compatible with the original shape.
|
||||
mode : str, optional
|
||||
Where to preferentially locate missing dimensions.
|
||||
|
@ -1023,7 +1023,7 @@ class Rotation:
|
|||
|
||||
Parameters
|
||||
----------
|
||||
shape : int or sequence of ints, optional
|
||||
shape : (sequence of) int, optional
|
||||
Shape of the returned array. Defaults to None, which gives a scalar.
|
||||
rng_seed : {None, int, array_like[ints], SeedSequence, BitGenerator, Generator}, optional
|
||||
A seed to initialize the BitGenerator.
|
||||
|
@ -1059,7 +1059,7 @@ class Rotation:
|
|||
Texture intensity values (probability density or volume fraction) at Euler space grid points.
|
||||
phi : numpy.ndarray, shape (n,3)
|
||||
Grid coordinates in Euler space at which weights are defined.
|
||||
shape : int or sequence of ints, optional
|
||||
shape : (sequence of) int, optional
|
||||
Shape of the returned array. Defaults to None, which gives a scalar.
|
||||
degrees : bool, optional
|
||||
Euler space grid coordinates are in degrees. Defaults to True.
|
||||
|
@ -1111,7 +1111,7 @@ class Rotation:
|
|||
Central rotation.
|
||||
sigma : float
|
||||
Standard deviation of (Gaussian) misorientation distribution.
|
||||
shape : int or sequence of ints, optional
|
||||
shape : (sequence of) int, optional
|
||||
Shape of the returned array. Defaults to None, which gives a scalar.
|
||||
degrees : bool, optional
|
||||
sigma is given in degrees. Defaults to False.
|
||||
|
@ -1169,7 +1169,7 @@ class Rotation:
|
|||
sigma : float, optional
|
||||
Standard deviation of (Gaussian) misorientation distribution.
|
||||
Defaults to 0.
|
||||
shape : int or sequence of ints, optional
|
||||
shape : (sequence of) int, optional
|
||||
Shape of the returned array. Defaults to None, which gives a scalar.
|
||||
degrees : bool, optional
|
||||
sigma and polar coordinates are given in degrees. Defaults to False.
|
||||
|
|
|
@ -25,7 +25,7 @@ class Table:
|
|||
For instance, 'F':(3,3) for a deformation gradient, or 'r':(1,) for a scalar.
|
||||
data : numpy.ndarray or pandas.DataFrame, optional
|
||||
Data. Existing column labels of a pandas.DataFrame will be replaced.
|
||||
comments : str or iterable of str, optional
|
||||
comments : (iterable of) str, optional
|
||||
Additional, human-readable information.
|
||||
|
||||
"""
|
||||
|
@ -464,9 +464,9 @@ class Table:
|
|||
|
||||
Parameters
|
||||
----------
|
||||
label_old : str or iterable of str
|
||||
label_old : (iterable of) str
|
||||
Old column label(s).
|
||||
label_new : str or iterable of str
|
||||
label_new : (iterable of) str
|
||||
New column label(s).
|
||||
|
||||
Returns
|
||||
|
|
|
@ -110,7 +110,7 @@ class VTK:
|
|||
|
||||
Parameters
|
||||
----------
|
||||
comments : str or sequence of str
|
||||
comments : (sequence of) str
|
||||
Comments.
|
||||
|
||||
"""
|
||||
|
|
|
@ -118,7 +118,7 @@ def from_grid(grid,
|
|||
----------
|
||||
grid : damask.Grid
|
||||
Grid from which the material IDs are used as seeds.
|
||||
selection : int or collection of int, optional
|
||||
selection : (collection of) int, optional
|
||||
Material IDs to consider.
|
||||
invert_selection : bool, optional
|
||||
Consider all material IDs except those in selection. Defaults to False.
|
||||
|
|
|
@ -46,7 +46,7 @@ def srepr(msg,
|
|||
|
||||
Parameters
|
||||
----------
|
||||
msg : object with __repr__ or sequence of objects with __repr__
|
||||
msg : (sequence of) object with __repr__
|
||||
Items to join.
|
||||
glue : str, optional
|
||||
Glue used for joining operation. Defaults to '\n'.
|
||||
|
@ -71,7 +71,7 @@ def emph(msg) -> str:
|
|||
|
||||
Parameters
|
||||
----------
|
||||
msg : object with __repr__ or sequence of objects with __repr__
|
||||
msg : (sequence of) object with __repr__
|
||||
Message to format.
|
||||
|
||||
Returns
|
||||
|
@ -88,7 +88,7 @@ def deemph(msg) -> str:
|
|||
|
||||
Parameters
|
||||
----------
|
||||
msg : object with __repr__ or sequence of objects with __repr__
|
||||
msg : (sequence of) object with __repr__
|
||||
Message to format.
|
||||
|
||||
Returns
|
||||
|
@ -105,7 +105,7 @@ def warn(msg) -> str:
|
|||
|
||||
Parameters
|
||||
----------
|
||||
msg : object with __repr__ or sequence of objects with __repr__
|
||||
msg : (sequence of) object with __repr__
|
||||
Message to format.
|
||||
|
||||
Returns
|
||||
|
@ -122,7 +122,7 @@ def strikeout(msg) -> str:
|
|||
|
||||
Parameters
|
||||
----------
|
||||
msg : object with __repr__ or iterable of objects with __repr__
|
||||
msg : (iterable of) object with __repr__
|
||||
Message to format.
|
||||
|
||||
Returns
|
||||
|
@ -738,7 +738,7 @@ def tail_repack(extended: _Union[str, _Sequence[str]],
|
|||
|
||||
Parameters
|
||||
----------
|
||||
extended : str or list of str
|
||||
extended : (list of) str
|
||||
Extended string list with potentially autosplitted tailing string relative to `existing`.
|
||||
existing : list of str
|
||||
Base string list.
|
||||
|
@ -767,7 +767,7 @@ def aslist(arg: _Union[_IntCollection, int, None]) -> _List:
|
|||
|
||||
Parameters
|
||||
----------
|
||||
arg : int or collection of int or None
|
||||
arg : (collection of) int or None
|
||||
Entity to transform into list.
|
||||
|
||||
Returns
|
||||
|
|
Loading…
Reference in New Issue