code: def test_fromrecords_with_explicit_dtype(self):
      a = np.rec.fromrecords(
          [(1, "a"), (2, "bbb")], dtype=[("a", int), ("b", object)]
      )
      assert_equal(a.a, [1, 2])
      assert_equal(a[0].a, 1)
      assert_equal(a.b, ["a", "bbb"])
      assert_equal(a[-1].b, "bbb")
      #
      ndtype = np.dtype([("a", int), ("b", object)])
      a = np.rec.fromrecords([(1, "a"), (2, "bbb")], dtype=ndtype)
      assert_equal(a.a, [1, 2])
      assert_equal(a[0].a, 1)
      assert_equal(a.b, ["a", "bbb"])
      assert_equal(a[-1].b, "bbb")
  
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 16 for calling the TestFromrecords obj's underlying member method code with example usage: obj.test_fromrecords_with_explicit_dtype() without return types