code: def test_fromrecords_2d(self):
      data = [[(1, 2), (3, 4), (5, 6)], [(6, 5), (4, 3), (2, 1)]]
      expected_a = [[1, 3, 5], [6, 4, 2]]
      expected_b = [[2, 4, 6], [5, 3, 1]]
  
      # try with dtype
      r1 = np.rec.fromrecords(data, dtype=[("a", int), ("b", int)])
      assert_equal(r1["a"], expected_a)
      assert_equal(r1["b"], expected_b)
  
      # try with names
      r2 = np.rec.fromrecords(data, names=["a", "b"])
      assert_equal(r2["a"], expected_a)
      assert_equal(r2["b"], expected_b)
  
      assert_equal(r1, r2)
  
imports: import collections.abc
  import textwrap
  from io import BytesIO
  from os import path
  from pathlib import Path
  import pytest
  import numpy
  from numpy.testing import assert_, assert_equal, assert_array_equal, assert_array_almost_equal, assert_raises, temppath
  from numpy.compat import pickle
label_desc: Use image node_id 3 for calling the TestFromrecords obj's underlying member method code with example usage: obj.test_fromrecords_2d() without return types