code: def test_astype_float64_to_float_dtype(self, dtype):
      # GH#12881
      # a float astype int
      idx = Index([0, 1, 2], dtype=np.float64)
      result = idx.astype(dtype)
      assert isinstance(result, Index) and result.dtype == dtype
  
file_path: pandas/pandas/tests/indexes/numeric/test_astype.py
imports: import numpy
  import pytest
  from pandas import Index, to_datetime, to_timedelta
  import pandas._testing
label_desc: Use image node_id 5 for calling the TestAstype obj's underlying member method code with example usage: obj.test_astype_float64_to_float_dtype(dtype) without return types