code: def test_float_to_string_cast(str_dt, float_dt):
      float_dt = np.dtype(float_dt)
      fi = np.finfo(float_dt)
      arr = np.array(
          [np.nan, np.inf, -np.inf, fi.max, fi.min], dtype=float_dt
      )
      expected = ["nan", "inf", "-inf", repr(fi.max), repr(fi.min)]
      if float_dt.kind == "c":
          expected = [f"({r}+0j)" for r in expected]
  
      res = arr.astype(str_dt)
      assert_array_equal(res, np.array(expected, dtype=str_dt))
  
file_path: catboost/contrib/python/numpy/py3/numpy/core/tests/test_strings.py
imports: import pytest
  import operator
  import numpy
  from numpy.testing import assert_array_equal
label_desc: Use image node_id 5 for calling a global function with example usage: test_float_to_string_cast(str_dt, float_dt) without return types