Skip to content

Commit

Permalink
Fixed some deprecation warnings regarding Python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentRDC committed Dec 2, 2020
1 parent a7362d6 commit 7fa6c61
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions skued/eproperties.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

def lorentz(keV):
"""
Relativistic factor :math:`\gamma`, defined as :math:`\gamma = \\frac{1}{\sqrt{1 - v^2/c^2}}`
Relativistic factor :math:`\\gamma`, defined as :math:`\\gamma = \\frac{1}{\\sqrt{1 - v^2/c^2}}`
Parameters
----------
Expand All @@ -27,13 +27,13 @@ def lorentz(keV):

def electron_wavelength(keV):
"""
Relativistic wavelength :math:`\lambda` of an accelerated electron.
Relativistic wavelength :math:`\\lambda` of an accelerated electron.
.. math::
\lambda = \\frac{h}{\sqrt{2 m_e e V}}\gamma
\\lambda = \\frac{h}{\\sqrt{2 m_e e V}}\\gamma
where :math:`\gamma` is the relativistic Lorentz factor.
where :math:`\\gamma` is the relativistic Lorentz factor.
Parameters
----------
Expand Down Expand Up @@ -64,7 +64,7 @@ def electron_velocity(keV):
.. math::
\\frac{v_e}{c} = \sqrt{1 - \\frac{m_0 c^2}{m_0 c^2 + e V}}
\\frac{v_e}{c} = \\sqrt{1 - \\frac{m_0 c^2}{m_0 c^2 + e V}}
Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion skued/simulation/form_factors.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def affe(atom, nG):
Atomic number, atomic symbol, or Atom instance.
Atomic symbols are expected to be properly capitalized, e.g. ``As`` or ``W``.
nG : array_like
Scattering vector norm, in units of Angstroms:math:`^{-1}`. (:math:`|G| = 4 \pi s`).
Scattering vector norm, in units of Angstroms:math:`^{-1}`. (:math:`|G| = 4 \\pi s`).
Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion skued/simulation/structure_factors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
Structure Factor calculation
"""
from collections import Iterable
from collections.abc import Iterable
from functools import lru_cache
from itertools import count, product, takewhile
from math import sqrt
Expand Down

0 comments on commit 7fa6c61

Please sign in to comment.