From a1e1a3bce31e5aec9dbd6b720e682eaa015a15ee Mon Sep 17 00:00:00 2001 From: Marvin Friede <51965259+marvinfriede@users.noreply.github.com> Date: Sun, 5 Jan 2025 21:13:05 +0100 Subject: [PATCH] Set dtype and device in `trapzd` (#80) --- src/tad_dftd4/model.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tad_dftd4/model.py b/src/tad_dftd4/model.py index c44d021..a0979e6 100644 --- a/src/tad_dftd4/model.py +++ b/src/tad_dftd4/model.py @@ -531,7 +531,9 @@ def trapzd(polarizability: Tensor) -> Tensor: 1.7500000000000000, 2.5000000000000000, 1.2500000000000000, - ] + ], + device=polarizability.device, + dtype=polarizability.dtype, ) # NOTE: In the old version, a memory inefficient intermediate tensor was