Yes, you could create the numpy arrays in float32 or cast then using .astype(np.float32).
Alternatively, you might create them using PyTorch methods, which will create them in torch.float32 by default.