Skip to content

Commit

Permalink
Remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentRDC committed Dec 11, 2020
1 parent 3041afb commit 61e35a6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions crystals/lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
from .affine import change_basis_mesh, change_of_basis


# Generalized hypotenuse
def _hypot(*args):
return sqrt(sum(map(lambda i: i ** 2, args)))


def primed(gen):
"""
Decorator that primes a generator function, i.e. runs the function
Expand Down Expand Up @@ -321,6 +316,10 @@ def bounded_reflections(self, bound, min_bound=0):

yield # Priming the generator ends here

# Generalized hypotenuse
def _hypot(*args):
return sqrt(sum(map(lambda i: i ** 2, args)))

# The above bound was only a first pass. We can refine further
in_bounds = (
lambda refl: min_bound <= _hypot(*self.scattering_vector(refl)) <= bound
Expand Down

0 comments on commit 61e35a6

Please sign in to comment.