From c5c8aeb7017a5830f496bae51a2597872f6c4da4 Mon Sep 17 00:00:00 2001 From: dimerf99 <93322314+dimerf99@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:57:14 +0300 Subject: [PATCH] Update utils.py Correcting code --- tedeous/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tedeous/utils.py b/tedeous/utils.py index db885b8a..9f40d1db 100644 --- a/tedeous/utils.py +++ b/tedeous/utils.py @@ -327,9 +327,9 @@ def init_data(grid, datapath): device_origin = grid.device grid = grid.to('cpu').detach() - test_data = np.loadtxt(datapath, comments="%", encoding='utf-8').astype(np.float32) - test_data = torch.from_numpy(test_data) - grid_data = torch.stack([coord for coord in test_data[:, :-1]]) + init_data = np.loadtxt(datapath, comments="%", encoding='utf-8').astype(np.float32) + init_data = torch.from_numpy(init_data) + grid_data = torch.stack([coord for coord in init_data[:, :-1]]) init_value = test_data[:, -1:]