wordle-solver / a3c /utils.py
santit96's picture
Code refactor
254d61f
raw
history blame
186 Bytes
import torch
import numpy as np
def v_wrap(np_array, dtype=np.float32):
if np_array.dtype != dtype:
np_array = np_array.astype(dtype)
return torch.from_numpy(np_array)