From 37fb6e4d6d2ef0d5cde01797d2b60cfb3706de36 Mon Sep 17 00:00:00 2001 From: Daniel Kotik Date: Tue, 17 Aug 2021 10:49:48 +0200 Subject: [PATCH] Fix NameError: name 'cython' is not defined --- optbeam/_3d/beams.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/optbeam/_3d/beams.py b/optbeam/_3d/beams.py index 0188fa6..f4b0aed 100644 --- a/optbeam/_3d/beams.py +++ b/optbeam/_3d/beams.py @@ -42,7 +42,7 @@ def profile(self, r): try: (result, real_tol, - imag_tol) = _complex_dblquad(self if cython and cython.compiled + imag_tol) = _complex_dblquad(self if cython_imported and cython.compiled else self._integrand, 0, 2*math.pi, 0, math.pi/2) except Exception as e: @@ -88,8 +88,8 @@ def profile(self, r): try: (result, real_tol, - imag_tol) = _complex_dblquad(self if cython - and cython.compiled else self._integrand, + imag_tol) = _complex_dblquad(self if cython_imported and cython.compiled + else self._integrand, -self._k, self._k, -self._k, self._k) except Exception as e: print(type(e).__name__ + ":", e)