code: def test_recarray_repr(self):
      a = np.array(
          [(1, 0.1), (2, 0.2)], dtype=[("foo", "<i4"), ("bar", "<f8")]
      )
      a = np.rec.array(a)
      assert_equal(
          repr(a),
          textwrap.dedent(
              """\
              rec.array([(1, 0.1), (2, 0.2)],
                        dtype=[('foo', '<i4'), ('bar', '<f8')])"""
          ),
      )
  
      # make sure non-structured dtypes also show up as rec.array
      a = np.array(np.ones(4, dtype="f8"))
      assert_(repr(np.rec.array(a)).startswith("rec.array"))
  
      # check that the 'np.record' part of the dtype isn't shown
      a = np.rec.array(np.ones(3, dtype="i4,i4"))
      assert_equal(repr(a).find("numpy.record"), -1)
      a = np.rec.array(np.ones(3, dtype="i4"))
      assert_(repr(a).find("dtype=int32") != -1)
  
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 10 for calling the TestFromrecords obj's underlying member method code with example usage: obj.test_recarray_repr() without return types