Spaces:
Sleeping
Sleeping
File size: 186 Bytes
44db2f9 |
1 2 3 4 5 6 7 8 9 |
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)
|