diff --git a/sisl/_help.py b/sisl/_help.py index ef7ae3e32f..ac1bdaeccc 100644 --- a/sisl/_help.py +++ b/sisl/_help.py @@ -181,7 +181,7 @@ def array_replace(array, *replace, **kwargs): ---------- array : ndarray array in which to replace values from `replace` - replace: tuple + replace : tuple replacement values, if `replace` is a tuple, it will be interpreted as ``array[replace[0]] = replace[1]``. other : val diff --git a/sisl/_namedindex.py b/sisl/_namedindex.py index f02d21856d..8d79582fec 100644 --- a/sisl/_namedindex.py +++ b/sisl/_namedindex.py @@ -136,7 +136,7 @@ def merge(self, other, offset=0, duplicate="raise"): the object to merge names(+indices) with offset : int, optional `other` will have `offset` added to all indices before merge is done. - duplicate: {"raise", "union", "left", "right", "omit"} + duplicate : {"raise", "union", "left", "right", "omit"} Selects the default behaviour in case of name conflict. Default ("raise") is to raise a ValueError in the case of conflict. If "union", each name will contain indices from both `self` and `other`. diff --git a/sisl/geom/nanotube.py b/sisl/geom/nanotube.py index 4f4f352456..bb5a2c5e52 100644 --- a/sisl/geom/nanotube.py +++ b/sisl/geom/nanotube.py @@ -14,11 +14,11 @@ def nanotube(bond, atom=None, chirality=(1, 1)): Parameters ---------- - bond: float + bond : float length between atoms in nano-tube - atom: Atom(6) + atom : Atom(6) nanotube atoms - chirality: (int, int) + chirality : (int, int) chirality of nanotube (n, m) """ if atom is None: diff --git a/sisl/geometry.py b/sisl/geometry.py index 2a4a1df092..88fdd94dc2 100644 --- a/sisl/geometry.py +++ b/sisl/geometry.py @@ -72,9 +72,9 @@ class Geometry(SuperCellChild): the supercell describing the periodicity of the geometry no - n_s: int + n_s : int total number of supercells in the supercell - no_s: int + no_s : int total number of orbitals in the geometry times number of supercells Parameters @@ -2907,7 +2907,7 @@ def o2a(self, io, unique=False): Parameters ---------- - io: array_like + io : array_like List of indices to return the atoms for unique : bool, optional If True only return the unique atoms. @@ -3482,16 +3482,16 @@ def ArgumentParser(self, p=None, *args, **kwargs): Parameters ---------- - parser: ArgumentParser, optional + parser : ArgumentParser, optional in case the arguments should be added to a specific parser. It defaults to create a new. - limit_arguments: bool, optional + limit_arguments : bool, optional If ``False`` additional options will be created which are similar to other options. For instance ``--repeat-x`` which is equivalent to ``--repeat x``. Default `True`. - short: bool, optional + short : bool, optional Create short options for a selected range of options. - positional_out: bool, optional + positional_out : bool, optional If ``True``, adds a positional argument which acts as --out. This may be handy if only the geometry is in the argument list. """ limit_args = kwargs.get('limit_arguments', True) diff --git a/sisl/grid.py b/sisl/grid.py index 0fa450569e..2608ddd8c1 100644 --- a/sisl/grid.py +++ b/sisl/grid.py @@ -215,13 +215,13 @@ def set_bc(self, boundary=None, a=None, b=None, c=None): Parameters ---------- - boundary: (3, 2) or (3, ) or int, optional + boundary : (3, 2) or (3, ) or int, optional boundary condition for all boundaries (or the same for all) - a: int or list of int, optional + a : int or list of int, optional boundary condition for the first unit-cell vector direction - b: int or list of int, optional + b : int or list of int, optional boundary condition for the second unit-cell vector direction - c: int or list of int, optional + c : int or list of int, optional boundary condition for the third unit-cell vector direction Raises @@ -400,7 +400,7 @@ def remove_part(self, idx, axis, above): for ``above=False`` grid[idx:,...] axis : int the axis segment from which we retain the indices `idx` - above: bool + above : bool if ``True`` will retain the grid: ``grid[:idx,...]`` else it will retain the grid: @@ -421,7 +421,7 @@ def sub_part(self, idx, axis, above): for ``above=False`` grid[:idx,...] axis : int the axis segment from which we retain the indices `idx` - above: bool + above : bool if ``True`` will retain the grid: ``grid[idx:,...]`` else it will retain the grid: @@ -1180,15 +1180,15 @@ def ArgumentParser(self, p=None, *args, **kwargs): Parameters ---------- - p: ArgumentParser, None + p : ArgumentParser, None in case the arguments should be added to a specific parser. It defaults to create a new. - limit_arguments: bool, True + limit_arguments : bool, True If `False` additional options will be created which are similar to other options. For instance `--repeat-x` which is equivalent to `--repeat x`. - short: bool, False + short : bool, False Create short options for a selected range of options - positional_out: bool, False + positional_out : bool, False If `True`, adds a positional argument which acts as --out. This may be handy if only the geometry is in the argument list. """ limit_args = kwargs.get('limit_arguments', True) diff --git a/sisl/io/ham.py b/sisl/io/ham.py index 586f2aebee..c139864655 100644 --- a/sisl/io/ham.py +++ b/sisl/io/ham.py @@ -156,7 +156,7 @@ def write_geometry(self, geom, fmt='.8f', **kwargs): Parameters ---------- - geom: Geometry + geom : Geometry The geometry we wish to write """ diff --git a/sisl/io/sile.py b/sisl/io/sile.py index 4bdcbd6eb0..a699522545 100644 --- a/sisl/io/sile.py +++ b/sisl/io/sile.py @@ -440,7 +440,7 @@ def ArgumentParser(self, p=None, *args, **kwargs): Parameters ---------- - p: ArgumentParser + p : ArgumentParser the argument parser to add the arguments to. """ raise NotImplementedError("The ArgumentParser of '"+self.__class__.__name__+"' has not been implemented yet.") @@ -450,7 +450,7 @@ def ArgumentParser_out(self, p=None, *args, **kwargs): Parameters ---------- - p: ArgumentParser + p : ArgumentParser the argument parser to add the arguments to. """ pass diff --git a/sisl/io/xsf.py b/sisl/io/xsf.py index 4bdeccd5ec..7972c43a95 100644 --- a/sisl/io/xsf.py +++ b/sisl/io/xsf.py @@ -131,7 +131,7 @@ def read_geometry(self, data=False): Parameters ---------- - data: bool, optional + data : bool, optional in case the XSF file has auxiliary data, return that as well. """ # Prepare containers... diff --git a/sisl/messages.py b/sisl/messages.py index d8de531f95..fdab742fd8 100644 --- a/sisl/messages.py +++ b/sisl/messages.py @@ -58,7 +58,7 @@ def deprecate(message): Parameters ---------- - message: str + message : str """ warnings.warn_explicit(message, SislDeprecation, 'dep', 0, registry=_sisl_warn_registry) @@ -68,12 +68,12 @@ def warn(message, category=None, register=False): Parameters ---------- - message: str, Warning + message : str, Warning the warning to issue, default to issue a `SislWarning` - category: Warning, optional + category : Warning, optional the category of the warning to issue. Default to `SislWarning', unless `message` is a subclass of `Warning` - register: bool, optional + register : bool, optional whether the warning is registered to limit the number of times this is output """ if isinstance(message, Warning): @@ -91,12 +91,12 @@ def info(message, category=None, register=False): Parameters ---------- - message: str, Warning + message : str, Warning the information to issue, default to issue a `SislInfo` - category: Warning, optional + category : Warning, optional the category of the warning to issue. Default to `SislInfo', unless `message` is a subclass of `Warning` - register: bool, optional + register : bool, optional whether the information is registered to limit the number of times this is output """ if isinstance(message, Warning): diff --git a/sisl/physics/bloch.py b/sisl/physics/bloch.py index 05f1a2b8ee..7d30604d92 100644 --- a/sisl/physics/bloch.py +++ b/sisl/physics/bloch.py @@ -148,7 +148,7 @@ def __call__(self, func, k, *args, **kwargs): k-point to be unfolded *args : list arguments passed directly to `func` - **kwargs: dict + **kwargs : dict keyword arguments passed directly to `func` Returns diff --git a/sisl/physics/brillouinzone.py b/sisl/physics/brillouinzone.py index 59d042a3e6..c94a308898 100644 --- a/sisl/physics/brillouinzone.py +++ b/sisl/physics/brillouinzone.py @@ -220,9 +220,9 @@ def parametrize(self, sc, func, N, *args, **kwargs): a k-point in 3 dimensions. N : int number of k-points generated using the parameterization - args: list of arguments + args : list of arguments arguments passed directly to `func` - kwargs: dictionary of arguments + kwargs : dictionary of arguments keyword arguments passed directly to `func` """ k = np.empty([N, 3], np.float64) diff --git a/sisl/physics/densitymatrix.py b/sisl/physics/densitymatrix.py index 5e5b8400d0..623badf527 100644 --- a/sisl/physics/densitymatrix.py +++ b/sisl/physics/densitymatrix.py @@ -100,7 +100,7 @@ def density(self, grid, spinor=None, tol=1e-7, eta=False): tol : float, optional DM tolerance for accepted values. For all density matrix elements with absolute values below the tolerance, they will be treated as strictly zeros. - eta: bool, optional + eta : bool, optional show a progressbar on stdout """ try: diff --git a/sisl/physics/distribution.py b/sisl/physics/distribution.py index 16987173e4..d822caac28 100644 --- a/sisl/physics/distribution.py +++ b/sisl/physics/distribution.py @@ -57,11 +57,11 @@ def get_distribution(method, smearing=0.1, x0=0.): Parameters ---------- - method: {'gaussian', 'lorentzian', 'fermi_dirac', 'bose_einstein', 'step_function', 'heaviside'} + method : {'gaussian', 'lorentzian', 'fermi_dirac', 'bose_einstein', 'step_function', 'heaviside'} distribution function - smearing: float, optional + smearing : float, optional smearing parameter for methods that have a smearing - x0: float, optional + x0 : float, optional maximum/middle of the distribution function Returns @@ -95,11 +95,11 @@ def gaussian(x, sigma=0.1, x0=0.): Parameters ---------- - x: array_like + x : array_like points at which the Gaussian distribution is calculated - sigma: float, optional + sigma : float, optional spread of the Gaussian - x0: float, optional + x0 : float, optional maximum position of the Gaussian Returns @@ -119,11 +119,11 @@ def lorentzian(x, gamma=0.1, x0=0.): Parameters ---------- - x: array_like + x : array_like points at which the Lorentzian distribution is calculated - gamma: float, optional + gamma : float, optional spread of the Lorentzian - x0: float, optional + x0 : float, optional maximum position of the Lorentzian Returns @@ -142,11 +142,11 @@ def fermi_dirac(E, kT=0.1, mu=0.): Parameters ---------- - E: array_like + E : array_like energy evaluation points - kT: float, optional + kT : float, optional temperature broadening - mu: float, optional + mu : float, optional chemical potential Returns @@ -165,11 +165,11 @@ def bose_einstein(E, kT=0.1, mu=0.): Parameters ---------- - E: array_like + E : array_like energy evaluation points - kT: float, optional + kT : float, optional temperature broadening - mu: float, optional + mu : float, optional chemical potential Returns @@ -190,11 +190,11 @@ def cold(E, kT=0.1, mu=0.): Parameters ---------- - E: array_like + E : array_like energy evaluation points - kT: float, optional + kT : float, optional temperature broadening - mu: float, optional + mu : float, optional chemical potential Returns @@ -224,9 +224,9 @@ def heaviside(x, x0=0.): Parameters ---------- - x: array_like + x : array_like points at which the Heaviside step distribution is calculated - x0: float, optional + x0 : float, optional step position Returns @@ -260,9 +260,9 @@ def step_function(x, x0=0.): Parameters ---------- - x: array_like + x : array_like points at which the step distribution is calculated - x0: float, optional + x0 : float, optional step position Returns diff --git a/sisl/physics/dynamicalmatrix.py b/sisl/physics/dynamicalmatrix.py index e8899a5f82..e2003a10bf 100644 --- a/sisl/physics/dynamicalmatrix.py +++ b/sisl/physics/dynamicalmatrix.py @@ -350,7 +350,7 @@ def velocity(self, k=(0, 0, 0), **kwargs): ---------- k : array_like, optional k-point at which the velocities are calculated - **kwargs: optional + **kwargs : optional additional parameters passed to the `eigenmode` routine See Also @@ -368,7 +368,7 @@ def displacement(self, k=(0, 0, 0), **kwargs): ---------- k : array_like, optional k-point at which the displacement are calculated - **kwargs: optional + **kwargs : optional additional parameters passed to the `eigenmode` routine See Also @@ -391,7 +391,7 @@ def DOS(self, E, k=(0, 0, 0), distribution='gaussian', **kwargs): distribution : func or str, optional a function that accepts :math:`E-\hbar\omega` as argument and calculates the distribution function. - **kwargs: optional + **kwargs : optional additional parameters passed to the `eigenvalue` routine See Also @@ -415,7 +415,7 @@ def PDOS(self, E, k=(0, 0, 0), distribution='gaussian', **kwargs): distribution : func or str, optional a function that accepts :math:`E-\epsilon` as argument and calculates the distribution function. - **kwargs: optional + **kwargs : optional additional parameters passed to the `eigenmode` routine See Also diff --git a/sisl/physics/electron.py b/sisl/physics/electron.py index 5995f86905..823ee4b32f 100644 --- a/sisl/physics/electron.py +++ b/sisl/physics/electron.py @@ -110,7 +110,7 @@ def DOS(E, eig, distribution='gaussian'): -------- sisl.physics.distribution : a selected set of implemented distribution functions PDOS : projected DOS (same as this, but projected onto each orbital) - spin_moment: spin moment for states + spin_moment : spin moment for states Returns ------- @@ -187,7 +187,7 @@ def PDOS(E, eig, state, S=None, distribution='gaussian', spin=None): -------- sisl.physics.distribution : a selected set of implemented distribution functions DOS : total DOS (same as summing over orbitals) - spin_moment: spin moment for states + spin_moment : spin moment for states Returns ------- @@ -446,7 +446,7 @@ def velocity(state, dHk, energy=None, dSk=None, degenerate=None): :math:`\delta \mathbf S_k` matrix required for non-orthogonal basis. This and `energy` *must* both be provided in a non-orthogonal basis (otherwise the results will be wrong). Same derivative as `dHk` - degenerate: list of array_like, optional + degenerate : list of array_like, optional a list containing the indices of degenerate states. In that case a prior diagonalization is required to decouple them. This is done 3 times along each of the Cartesian directions. @@ -561,7 +561,7 @@ def velocity_matrix(state, dHk, energy=None, dSk=None, degenerate=None): :math:`\delta \mathbf S_k` matrix required for non-orthogonal basis. This and `energy` *must* both be provided in a non-orthogonal basis (otherwise the results will be wrong). Same derivative as `dHk` - degenerate: list of array_like, optional + degenerate : list of array_like, optional a list containing the indices of degenerate states. In that case a prior diagonalization is required to decouple them. This is done 3 times along each of the Cartesian directions. @@ -689,7 +689,7 @@ def inv_eff_mass_tensor(state, ddHk, energy=None, ddSk=None, degenerate=None, as overlap matrix required for non-orthogonal basis. This and `energy` *must* both be provided when the states are defined in a non-orthogonal basis (otherwise the results will be wrong). Same order as `ddHk`. - degenerate: list of array_like, optional + degenerate : list of array_like, optional a list containing the indices of degenerate states. In that case a subsequent diagonalization is required to decouple them. This is done 3 times along the diagonal Cartesian directions. as_matrix : bool, optional @@ -1314,7 +1314,7 @@ def Sk(self, format='csr', spin=None): Parameters ---------- - format: str, optional + format : str, optional the returned format of the overlap matrix. This only takes effect for non-orthogonal parents. spin : Spin, optional diff --git a/sisl/physics/hamiltonian.py b/sisl/physics/hamiltonian.py index ee35b24233..3ebb952075 100644 --- a/sisl/physics/hamiltonian.py +++ b/sisl/physics/hamiltonian.py @@ -374,7 +374,7 @@ def spin_squared(self, k=(0, 0, 0), n_up=None, n_down=None, **kwargs): `n_up`. n_down : int, optional same as `n_up` but for the spin-down configuration - **kwargs: optional + **kwargs : optional additional parameters passed to the `eigenstate` routine """ if not self.spin.is_polarized: @@ -395,7 +395,7 @@ def velocity(self, k=(0, 0, 0), **kwargs): ---------- k : array_like, optional k-point at which the velocities are calculated - **kwargs: optional + **kwargs : optional additional parameters passed to the `eigenstate` routine See Also @@ -412,7 +412,7 @@ def spin_moment(self, k=(0, 0, 0), **kwargs): ---------- k : array_like, optional k-point at which the spin moments are calculated - **kwargs: optional + **kwargs : optional additional parameters passed to the `eigenstate` routine See Also @@ -434,7 +434,7 @@ def DOS(self, E, k=(0, 0, 0), distribution='gaussian', **kwargs): distribution : func or str, optional a function that accepts :math:`E-\epsilon` as argument and calculates the distribution function. - **kwargs: optional + **kwargs : optional additional parameters passed to the `eigenvalue` routine See Also @@ -458,7 +458,7 @@ def PDOS(self, E, k=(0, 0, 0), distribution='gaussian', **kwargs): distribution : func or str, optional a function that accepts :math:`E-\epsilon` as argument and calculates the distribution function. - **kwargs: optional + **kwargs : optional additional parameters passed to the `eigenstate` routine See Also diff --git a/sisl/physics/phonon.py b/sisl/physics/phonon.py index 7f0a81c793..4cec44d456 100644 --- a/sisl/physics/phonon.py +++ b/sisl/physics/phonon.py @@ -153,7 +153,7 @@ def velocity(mode, hw, dDk, degenerate=None): dDk : list of array_like Dynamical matrix derivative with respect to :math:`\mathbf k`. This needs to be a tuple or list of the dynamical matrix derivative along the 3 Cartesian directions. - degenerate: list of array_like, optional + degenerate : list of array_like, optional a list containing the indices of degenerate modes. In that case a prior diagonalization is required to decouple them. This is done 3 times along each of the Cartesian directions. diff --git a/sisl/physics/self_energy.py b/sisl/physics/self_energy.py index fbc8b6ac41..e417a7c863 100644 --- a/sisl/physics/self_energy.py +++ b/sisl/physics/self_energy.py @@ -493,7 +493,7 @@ class RealSpaceSE(SelfEnergy): integration k-points, if not passed the number of k-points will be determined using `dk` and time-reversal symmetry will be determined by `trs`, the number of points refers to the unfolded system. - trs: bool, optional + trs : bool, optional whether time-reversal symmetry is used in the BrillouinZone integration, default to true. @@ -585,7 +585,7 @@ def set_options(self, **options): integration k-points, if not passed the number of k-points will be determined using `dk` and time-reversal symmetry will be determined by `trs`, the number of points refers to the unfolded system. - trs: bool, optional + trs : bool, optional whether time-reversal symmetry is used in the BrillouinZone integration, default to true. """ @@ -731,7 +731,7 @@ def self_energy(self, E, k=(0, 0, 0), bulk=False, coupling=False, dtype=None, ** bulk : bool, optional if true, :math:`\mathbf S^{\mathcal{R}} E - \mathbf H^{\mathcal{R}} - \boldsymbol\Sigma^\mathcal{R}` is returned, otherwise :math:`\boldsymbol\Sigma^\mathcal{R}` is returned - coupling: bool, optional + coupling : bool, optional if True, only the self-energy terms located on the coupling geometry (`coupling_geometry`) are returned dtype : numpy.dtype, optional @@ -980,7 +980,7 @@ class RealSpaceSI(SelfEnergy): integration k-points, if not passed the number of k-points will be determined using `dk` and time-reversal symmetry will be determined by `trs`, the number of points refers to the unfolded system. - trs: bool, optional + trs : bool, optional whether time-reversal symmetry is used in the BrillouinZone integration, default to true. @@ -1122,7 +1122,7 @@ def set_options(self, **options): integration k-points, if not passed the number of k-points will be determined using `dk` and time-reversal symmetry will be determined by `trs`, the number of points refers to the unfolded system. - trs: bool, optional + trs : bool, optional whether time-reversal symmetry is used in the BrillouinZone integration, default to true. """ @@ -1291,7 +1291,7 @@ def self_energy(self, E, k=(0, 0, 0), bulk=False, coupling=False, dtype=None, ** bulk : bool, optional if true, :math:`\mathbf S^{\mathcal{R}} E - \mathbf H^{\mathcal{R}} - \boldsymbol\Sigma^\mathcal{R}` is returned, otherwise :math:`\boldsymbol\Sigma^\mathcal{R}` is returned - coupling: bool, optional + coupling : bool, optional if True, only the self-energy terms located on the coupling geometry (`coupling_geometry`) are returned dtype : numpy.dtype, optional diff --git a/sisl/physics/sparse.py b/sisl/physics/sparse.py index 5654aea2a4..f1079b467e 100644 --- a/sisl/physics/sparse.py +++ b/sisl/physics/sparse.py @@ -205,7 +205,7 @@ def _Pk(self, k=(0, 0, 0), dtype=None, gauge='R', format='csr', _dim=0): Parameters ---------- - k: array_like, optional + k : array_like, optional k-point (default is Gamma point) dtype : numpy.dtype, optional default to `numpy.complex128` @@ -220,7 +220,7 @@ def _dPk(self, k=(0, 0, 0), dtype=None, gauge='R', format='csr', _dim=0): Parameters ---------- - k: array_like, optional + k : array_like, optional k-point (default is Gamma point) dtype : numpy.dtype, optional default to `numpy.complex128` @@ -235,7 +235,7 @@ def _ddPk(self, k=(0, 0, 0), dtype=None, gauge='R', format='csr', _dim=0): Parameters ---------- - k: array_like, optional + k : array_like, optional k-point (default is Gamma point) dtype : numpy.dtype, optional default to `numpy.complex128` @@ -314,7 +314,7 @@ def _Sk(self, k=(0, 0, 0), dtype=None, gauge='R', format='csr'): Parameters ---------- - k: array_like, optional + k : array_like, optional k-point (default is Gamma point) dtype : numpy.dtype, optional default to `numpy.complex128` @@ -378,7 +378,7 @@ def _dSk(self, k=(0, 0, 0), dtype=None, gauge='R', format='csr'): Parameters ---------- - k: array_like, optional + k : array_like, optional k-point (default is Gamma point) dtype : numpy.dtype, optional default to `numpy.complex128` @@ -442,7 +442,7 @@ def _ddSk(self, k=(0, 0, 0), dtype=None, gauge='R', format='csr'): Parameters ---------- - k: array_like, optional + k : array_like, optional k-point (default is Gamma point) dtype : numpy.dtype, optional default to `numpy.complex128` @@ -658,7 +658,7 @@ def _Pk_unpolarized(self, k=(0, 0, 0), dtype=None, gauge='R', format='csr'): Parameters ---------- - k: array_like, optional + k : array_like, optional k-point (default is Gamma point) dtype : numpy.dtype, optional default to `numpy.complex128` @@ -672,9 +672,9 @@ def _Pk_polarized(self, k=(0, 0, 0), spin=0, dtype=None, gauge='R', format='csr' Parameters ---------- - k: array_like, optional + k : array_like, optional k-point (default is Gamma point) - spin: int, optional + spin : int, optional the spin-index of the quantity dtype : numpy.dtype, optional default to `numpy.complex128` @@ -688,7 +688,7 @@ def _Pk_non_colinear(self, k=(0, 0, 0), dtype=None, gauge='R', format='csr'): Parameters ---------- - k: array_like, optional + k : array_like, optional k-point (default is Gamma point) dtype : numpy.dtype, optional default to `numpy.complex128` @@ -703,7 +703,7 @@ def _Pk_spin_orbit(self, k=(0, 0, 0), dtype=None, gauge='R', format='csr'): Parameters ---------- - k: array_like, optional + k : array_like, optional k-point (default is Gamma point) dtype : numpy.dtype, optional default to `numpy.complex128` @@ -718,7 +718,7 @@ def _dPk_unpolarized(self, k=(0, 0, 0), dtype=None, gauge='R', format='csr'): Parameters ---------- - k: array_like, optional + k : array_like, optional k-point (default is Gamma point) dtype : numpy.dtype, optional default to `numpy.complex128` @@ -732,9 +732,9 @@ def _dPk_polarized(self, k=(0, 0, 0), spin=0, dtype=None, gauge='R', format='csr Parameters ---------- - k: array_like, optional + k : array_like, optional k-point (default is Gamma point) - spin: int, optional + spin : int, optional the spin-index of the quantity dtype : numpy.dtype, optional default to `numpy.complex128` @@ -748,7 +748,7 @@ def _Sk(self, k=(0, 0, 0), dtype=None, gauge='R', format='csr'): Parameters ---------- - k: array_like, optional + k : array_like, optional k-point (default is Gamma point) dtype : numpy.dtype default to `numpy.complex128` @@ -762,7 +762,7 @@ def _Sk_non_colinear(self, k=(0, 0, 0), dtype=None, gauge='R', format='csr'): Parameters ---------- - k: array_like, optional + k : array_like, optional k-point (default is Gamma point) dtype : numpy.dtype, optional default to `numpy.complex128` diff --git a/sisl/physics/state.py b/sisl/physics/state.py index f2455a6090..f9e8072cd7 100644 --- a/sisl/physics/state.py +++ b/sisl/physics/state.py @@ -121,7 +121,7 @@ def degenerate(self, eps): Returns ------- - list of numpy.ndarray: a list of indices + list of numpy.ndarray : a list of indices """ deg = list() sidx = np.argsort(self.c) @@ -178,15 +178,15 @@ def iter(self, asarray=False): Parameters ---------- - asarray: bool, optional + asarray : bool, optional if true the yielded values are the coefficient vectors, i.e. a numpy array. Otherwise an equivalent object is yielded. Yields ------ - coeff: Coefficent + coeff : Coefficent the current coefficent as an object, only returned if `asarray` is false. - coeff: numpy.ndarray + coeff : numpy.ndarray the current the coefficient as an array, only returned if `asarray` is true. """ if asarray: @@ -304,7 +304,7 @@ def iter(self, asarray=False): Parameters ---------- - asarray: bool, optional + asarray : bool, optional if true the yielded values are the state vectors, i.e. a numpy array. Otherwise an equivalent object is yielded. @@ -482,7 +482,7 @@ def align(self, other, copy=False): ---------- other : State the other state to align onto this state - copy: bool, optional + copy : bool, optional sometimes no states require rotation, if this is the case this flag determines whether `other` will be copied or not """ @@ -518,7 +518,7 @@ def rotate(self, phi=0., individual=False): ---------- phi : float, optional angle to align the state at (in radians), 0 is the positive real axis - individual: bool, optional + individual : bool, optional whether the rotation is per state, or a single maximum component is chosen. """ # Convert angle to complex phase @@ -694,7 +694,7 @@ def degenerate(self, eps): Returns ------- - list of numpy.ndarray: a list of indices + list of numpy.ndarray : a list of indices """ deg = list() sidx = np.argsort(self.c) diff --git a/sisl/sparse.py b/sisl/sparse.py index 7e17b10e24..800960cf38 100644 --- a/sisl/sparse.py +++ b/sisl/sparse.py @@ -89,21 +89,21 @@ class SparseCSR(object): Attributes ---------- - ncol: int-array, ``self.shape[0]`` + ncol : int-array, ``self.shape[0]`` number of entries per row - ptr: int-array, ``self.shape[0]+1`` + ptr : int-array, ``self.shape[0]+1`` pointer index in the 1D column indices of the corresponding row - col: int-array + col : int-array column indices of the sparse elements data: the data in the sparse matrix - dim: int + dim : int the extra dimension of the sparse matrix - nnz: int + nnz : int number of contained sparse elements - shape: tuple, 3*(,) + shape : tuple, 3*(,) size of contained matrix, M, N, K - finalized: boolean + finalized : boolean whether the sparse matrix is finalized and non-set elements are removed """ @@ -286,7 +286,7 @@ def empty(self, keep_nnz=False): Parameters ---------- - keep_nnz: boolean, optional + keep_nnz : boolean, optional if ``True`` keeps the sparse elements *as is*. I.e. it will merely set the stored sparse elements to zero. This may be advantagegous when re-constructing a new sparse @@ -352,7 +352,7 @@ def finalize(self, sort=True): Parameters ---------- - sort: bool, optional + sort : bool, optional sort the column indices for each row """ if self.finalized: @@ -1103,7 +1103,7 @@ def copy(self, dims=None, dtype=None): Parameters ---------- - dims: array-like, optional + dims : array-like, optional which dimensions to store in the copy, defaults to all. dtype : `numpy.dtype` this defaults to the dtype of the object, @@ -1150,7 +1150,7 @@ def tocsr(self, dim=0, **kwargs): Parameters ---------- - dim: int, optional + dim : int, optional dimension of the data returned in a scipy sparse matrix format **kwargs: arguments passed to the :class:`~scipy.sparse.csr_matrix` routine diff --git a/sisl/sparse_geometry.py b/sisl/sparse_geometry.py index 86e36d2a95..39df5608b8 100644 --- a/sisl/sparse_geometry.py +++ b/sisl/sparse_geometry.py @@ -84,12 +84,12 @@ def reset(self, dim=None, dtype=np.float64, nnzpr=None): Parameters ---------- - dim: int, optional + dim : int, optional number of dimensions per element, default to the current number of elements per matrix element. - dtype: numpy.dtype, optional + dtype : numpy.dtype, optional the datatype of the sparse elements - nnzpr: int, optional + nnzpr : int, optional number of non-zero elements per row """ # I know that this is not the most efficient way to @@ -515,7 +515,7 @@ def construct(self, func, na_iR=1000, method='rand', eta=False): Parameters ---------- - func: callable or array_like + func : callable or array_like this function *must* take 4 arguments. 1. Is this object (``self``) 2. Is the currently examined atom (``ia``) @@ -533,7 +533,7 @@ def construct(self, func, na_iR=1000, method='rand', eta=False): up the `iter_block` loop. method : {'rand', str} method used in `Geometry.iter_block`, see there for details - eta: bool, optional + eta : bool, optional whether an ETA will be printed See Also @@ -2447,7 +2447,7 @@ def toSparseAtom(self, dim=None, dtype=None): ---------- dim : int, optional number of dimensions allocated in the SparseAtom object, default to the same - dtype: numpy.dtype, optional + dtype : numpy.dtype, optional used data-type for the sparse object. Defaults to the same. """ if dim is None: diff --git a/sisl/supercell.py b/sisl/supercell.py index fcb1ff4839..5144dc11d0 100644 --- a/sisl/supercell.py +++ b/sisl/supercell.py @@ -205,13 +205,13 @@ def _fill_sc(self, supercell_index): def set_nsc(self, nsc=None, a=None, b=None, c=None): """ Sets the number of supercells in the 3 different cell directions - nsc: list of int, optional + nsc : list of int, optional number of supercells in each direction - a: integer, optional + a : integer, optional number of supercells in the first unit-cell vector direction - b: integer, optional + b : integer, optional number of supercells in the second unit-cell vector direction - c: integer, optional + c : integer, optional number of supercells in the third unit-cell vector direction """ if not nsc is None: diff --git a/sisl/utils/cmd.py b/sisl/utils/cmd.py index ed8a3c3d8e..0dbc384149 100644 --- a/sisl/utils/cmd.py +++ b/sisl/utils/cmd.py @@ -95,7 +95,7 @@ def add_sisl_version_cite_arg(parser): Parameters ---------- - parser: `argparse.ArgumentParser` + parser : `argparse.ArgumentParser` the parser to add the version string too """ from sisl.info import version, git_revision, git_count, bibtex diff --git a/sisl/utils/misc.py b/sisl/utils/misc.py index 9e99203651..56f85b017a 100644 --- a/sisl/utils/misc.py +++ b/sisl/utils/misc.py @@ -59,7 +59,7 @@ def merge_instances(*args, **kwargs): *args : obj all objects dictionaries gets appended to a new class which is returned. - name: str, optional + name : str, optional name of class to merge, default to ``'MergedClass'`` """ name = kwargs.get('name', 'MergedClass') @@ -123,7 +123,7 @@ def str_spec(name): Parameters ---------- - name: str + name : str string to split Returns @@ -151,7 +151,7 @@ def direction(d): Parameters ---------- - d: {0, 'X', 'x', 1, 'Y', 'y', 2, 'Z', 'z'} + d : {0, 'X', 'x', 1, 'Y', 'y', 2, 'Z', 'z'} returns the integer that corresponds to the coordinate index. If it is an integer, it is returned *as is*. diff --git a/sisl/utils/ranges.py b/sisl/utils/ranges.py index 1dfa581ace..36a64501d5 100644 --- a/sisl/utils/ranges.py +++ b/sisl/utils/ranges.py @@ -104,9 +104,9 @@ def strseq(cast, s, start=None, end=None): Parameters ---------- - cast: function + cast : function parser of the individual elements - s: str + s : str string with content Examples diff --git a/sisl/utils/sdata.py b/sisl/utils/sdata.py index 2ae34801d7..efe8bbcdbe 100644 --- a/sisl/utils/sdata.py +++ b/sisl/utils/sdata.py @@ -19,7 +19,7 @@ def argparse_patch(parser): Parameters ---------- - parser: ArgumentParser + parser : ArgumentParser parser to be patched """ class MySubParsersAction(argparse._SubParsersAction):