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