From 739e96df3d9fb83b4cb62c26867a68fadfbf69eb Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Mon, 29 Jul 2024 00:34:17 -0700 Subject: [PATCH] avoid a copy --- meanas/fdfd/bloch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meanas/fdfd/bloch.py b/meanas/fdfd/bloch.py index 516dcf6..2f4a002 100644 --- a/meanas/fdfd/bloch.py +++ b/meanas/fdfd/bloch.py @@ -308,7 +308,7 @@ def hmn_2_exyz( - m * hin_n) * k_mag # noqa: E128 # divide by epsilon - return numpy.array([ei for ei in numpy.moveaxis(ifftn(d_xyz, axes=range(3)) / epsilon, 3, 0)]) # TODO avoid copy + return numpy.moveaxis(ifftn(d_xyz, axes=range(3)) / epsilon, 3, 0) return operator