(unified) type hints

This commit is contained in:
Martin Diehl 2020-08-08 20:56:17 +02:00
parent 309c53dc97
commit ff7eed4477
3 changed files with 13 additions and 13 deletions

View File

@ -51,7 +51,7 @@ class Colormap(mpl.colors.ListedColormap):
Color definition for minimum value. Color definition for minimum value.
high : numpy.ndarray of shape (3) high : numpy.ndarray of shape (3)
Color definition for maximum value. Color definition for maximum value.
N : integer, optional N : int, optional
The number of color quantization levels. Defaults to 256. The number of color quantization levels. Defaults to 256.
name : str, optional name : str, optional
The name of the colormap. Defaults to `DAMASK colormap`. The name of the colormap. Defaults to `DAMASK colormap`.

View File

@ -28,7 +28,7 @@ class Geom:
physical size of the microstructure in meter. physical size of the microstructure in meter.
origin : list or numpy.ndarray, optional origin : list or numpy.ndarray, optional
physical origin of the microstructure in meter. physical origin of the microstructure in meter.
homogenization : integer, optional homogenization : int, optional
homogenization index. homogenization index.
comments : list of str, optional comments : list of str, optional
comments lines. comments lines.
@ -210,7 +210,7 @@ class Geom:
Parameters Parameters
---------- ----------
homogenization : integer homogenization : int
homogenization index homogenization index
""" """
@ -345,7 +345,7 @@ class Geom:
Parameters Parameters
---------- ----------
grid : numpy.ndarray of shape (3) grid : int numpy.ndarray of shape (3)
Number of grid points in x,y,z direction. Number of grid points in x,y,z direction.
size : list or numpy.ndarray of shape (3) size : list or numpy.ndarray of shape (3)
Physical size of the microstructure in meter. Physical size of the microstructure in meter.
@ -391,7 +391,7 @@ class Geom:
Parameters Parameters
---------- ----------
grid : numpy.ndarray of shape (3) grid : int numpy.ndarray of shape (3)
Number of grid points in x,y,z direction. Number of grid points in x,y,z direction.
size : list or numpy.ndarray of shape (3) size : list or numpy.ndarray of shape (3)
Physical size of the microstructure in meter. Physical size of the microstructure in meter.
@ -509,11 +509,11 @@ class Geom:
Parameters Parameters
---------- ----------
dimension : numpy.ndarray of shape(3) dimension : int or float numpy.ndarray of shape(3)
Dimension (diameter/side length) of the primitive. If given as Dimension (diameter/side length) of the primitive. If given as
integers, grid point locations (cell centers) are addressed. integers, grid point locations (cell centers) are addressed.
If given as floats, coordinates are addressed. If given as floats, coordinates are addressed.
center : numpy.ndarray of shape(3) center : int or float numpy.ndarray of shape(3)
Center of the primitive. If given as integers, grid point Center of the primitive. If given as integers, grid point
locations (cell centers) are addressed. locations (cell centers) are addressed.
If given as floats, coordinates are addressed. If given as floats, coordinates are addressed.
@ -521,7 +521,7 @@ class Geom:
Exponents for the three axis. Exponents for the three axis.
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 a sphere (|x|^(2^1) + |y|^(2^1) + |z|^(2^1) < 1) 1 gives a sphere (|x|^(2^1) + |y|^(2^1) + |z|^(2^1) < 1)
fill : integer, optional fill : int, optional
Fill value for primitive. Defaults to microstructure.max() + 1. Fill value for primitive. Defaults to microstructure.max() + 1.
R : damask.Rotation, optional R : damask.Rotation, optional
Rotation of primitive. Defaults to no rotation. Rotation of primitive. Defaults to no rotation.

View File

@ -357,7 +357,7 @@ class Rotation:
accept_homomorph : boolean, optional accept_homomorph : boolean, optional
Allow homomorphic variants, i.e. q_0 < 0 (negative real hemisphere). Allow homomorphic variants, i.e. q_0 < 0 (negative real hemisphere).
Defaults to False. Defaults to False.
P : integer {-1,1}, optional P : int {-1,1}, optional
Convention used. Defaults to -1. Convention used. Defaults to -1.
""" """
@ -422,7 +422,7 @@ class Rotation:
Angle ω is given in degrees. Defaults to False. Angle ω is given in degrees. Defaults to False.
normalize: boolean, optional normalize: boolean, optional
Allow |n| 1. Defaults to False. Allow |n| 1. Defaults to False.
P : integer {-1,1}, optional P : int {-1,1}, optional
Convention used. Defaults to -1. Convention used. Defaults to -1.
""" """
@ -505,7 +505,7 @@ class Rotation:
(n_1, n_2, n_3, tan(ω/2)), |n| = 1 and ω [0,π]. (n_1, n_2, n_3, tan(ω/2)), |n| = 1 and ω [0,π].
normalize : boolean, optional normalize : boolean, optional
Allow |n| 1. Defaults to False. Allow |n| 1. Defaults to False.
P : integer {-1,1}, optional P : int {-1,1}, optional
Convention used. Defaults to -1. Convention used. Defaults to -1.
""" """
@ -534,7 +534,7 @@ class Rotation:
---------- ----------
h : numpy.ndarray of shape (...,3) h : numpy.ndarray of shape (...,3)
Homochoric vector: (h_1, h_2, h_3), |h| < (3/4*π)^(1/3). Homochoric vector: (h_1, h_2, h_3), |h| < (3/4*π)^(1/3).
P : integer {-1,1}, optional P : int {-1,1}, optional
Convention used. Defaults to -1. Convention used. Defaults to -1.
""" """
@ -561,7 +561,7 @@ class Rotation:
---------- ----------
c : numpy.ndarray of shape (...,3) c : numpy.ndarray of shape (...,3)
Cubochoric vector: (c_1, c_2, c_3), max(c_i) < 1/2*π^(2/3). Cubochoric vector: (c_1, c_2, c_3), max(c_i) < 1/2*π^(2/3).
P : integer {-1,1}, optional P : int {-1,1}, optional
Convention used. Defaults to -1. Convention used. Defaults to -1.
""" """