From 846a952ac5af2e034a9cf8556af5bbd60ebe7a0a Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Mon, 24 Nov 2025 13:58:18 +0000 Subject: [PATCH 1/2] Fix array reshape order. --- src/loch/_sampler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loch/_sampler.py b/src/loch/_sampler.py index 4f8574b..b8c9a95 100644 --- a/src/loch/_sampler.py +++ b/src/loch/_sampler.py @@ -2025,7 +2025,7 @@ def _accept_insertion( # Get the new water positions. water_positions = self._water_positions.get().reshape( - (self._batch_size, 3, self._num_points) + (self._batch_size, self._num_points, 3) )[idx] # Update the water state. From 091699833b256ceb84966167e88989f4a00915a7 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Mon, 24 Nov 2025 14:00:28 +0000 Subject: [PATCH 2/2] Fix loop range. --- src/loch/_kernels.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loch/_kernels.py b/src/loch/_kernels.py index b6f09ff..efc2752 100644 --- a/src/loch/_kernels.py +++ b/src/loch/_kernels.py @@ -498,7 +498,7 @@ water[2] = 0.0f; // Shift the other atoms by the appropriate amount. - for (int i = 0; i < 3; i++) + for (int i = 0; i < num_points; i++) { water[i*3 + 0] = water_template[i*3 + 0] - water_template[0]; water[i*3 + 1] = water_template[i*3 + 1] - water_template[1];