wordle-solver / a3c /utils.py
santit96's picture
Fix code style with black and isort
c412087
raw
history blame contribute delete
186 Bytes
import numpy as np
import torch
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)