code: def test_loadtxt_fields_subarrays(self):
      # For ticket #1936
      from io import StringIO
  
      dt = [("a", "u1", 2), ("b", "u1", 2)]
      x = np.loadtxt(StringIO("0 1 2 3"), dtype=dt)
      assert_equal(x, np.array([((0, 1), (2, 3))], dtype=dt))
  
      dt = [("a", [("a", "u1", (1, 3)), ("b", "u1")])]
      x = np.loadtxt(StringIO("0 1 2 3"), dtype=dt)
      assert_equal(x, np.array([(((0, 1, 2), 3),)], dtype=dt))
  
      dt = [("a", "u1", (2, 2))]
      x = np.loadtxt(StringIO("0 1 2 3"), dtype=dt)
      assert_equal(x, np.array([(((0, 1), (2, 3)),)], dtype=dt))
  
      dt = [("a", "u1", (2, 3, 2))]
      x = np.loadtxt(StringIO("0 1 2 3 4 5 6 7 8 9 10 11"), dtype=dt)
      data = [((((0, 1), (2, 3), (4, 5)), ((6, 7), (8, 9), (10, 11))),)]
      assert_equal(x, np.array(data, dtype=dt))
  
imports: import os
  import numpy
  from numpy.testing import assert_, assert_equal, assert_array_equal, assert_array_almost_equal, assert_raises, _assert_valid_refcount
  import pytest
label_desc: Use image node_id 23 for calling the TestRegression obj's underlying member method code with example usage: obj.test_loadtxt_fields_subarrays() without return types