/ tests / test_torch_numpy.py
test_torch_numpy.py
1  import numpy as np
2  import torch
3  
4  
5  def test_torch_to_numpy():
6      array = torch.tensor([1, 2, 3]).numpy()
7      assert np.array_equal(array, np.array([1, 2, 3]))