Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
Correcting code
  • Loading branch information
dimerf99 committed Dec 17, 2024
1 parent c771e8a commit c5c8aeb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tedeous/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:]

Expand Down

0 comments on commit c5c8aeb

Please sign in to comment.