title: PyTorch: How to append tensors into a list using loops
body: <p>I have the following code which outputs 2 arrays in a list:</p>
  <pre><code>arr1 = np.array([[1.,2,3], [4,5,6], [7,8,9]])
  
  arr_split = np.array_split(arr1,
                             indices_or_sections = 2,
                             axis = 0)
  
  arr_split
  </code></pre>
  <p>Output:</p>
  <pre><code>[array([[1., 2., 3.],
          [4., 5., 6.]]), array([[7., 8., 9.]])]
  </code></pre>
  <p>How do I cast these 2 arrays into PyTorch tensors and put them into a list using <code>for</code> (or <code>while</code>) loops, so that they look like this:</p>
  <pre><code>[tensor([[1., 2., 3.],
           [4., 5., 6.]], dtype=torch.float64),
  tensor([[7., 8., 9.]], dtype=torch.float64)]
  </code></pre>
  <p>Many thanks in advance!</p>