class_docstr: An ExtensionDtype to hold a single size of floating dtype.
  
  These specific implementations are subclasses of the non-public
  FloatingDtype. For example we have Float32Dtype to represent float32.
  
  The attributes name & type are set when these subclasses are created.
class_docstr_tok: ["An","ExtensionDtype","to","hold","a","single","size","of","floating","dtype",".","These","specific","implementations","are","subclasses","of","the","non-public","FloatingDtype",".","For","example","we","have","Float32Dtype","to","represent","float32",".","The","attributes","name","&","type","are","set","when","these","subclasses","are","created","."]
docstr: Safely cast the values to the given dtype.
  
  "safe" in this context means the casting is lossless.
docstr_tok: ["Safely","cast","the","values","to","the","given","dtype",".","``","safe","''","in","this","context","means","the","casting","is","lossless","."]
code: def _safe_cast(
      cls, values: np.ndarray, dtype: np.dtype, copy: bool
  ) -> np.ndarray:
      """
      Safely cast the values to the given dtype.
  
      "safe" in this context means the casting is lossless.
      """
      # This is really only here for compatibility with IntegerDtype
      # Here for compat with IntegerDtype
      return values.astype(dtype, copy=copy)
  
file_path: pandas/pandas/core/arrays/floating.py
imports: from __future__ import annotations
  from typing import ClassVar
  import numpy
  from pandas.core.dtypes.base import register_extension_dtype
  from pandas.core.dtypes.common import is_float_dtype
  from pandas.core.arrays.numeric import NumericArray, NumericDtype
label_desc: Use image node_id 3 for calling the FloatingDtype obj's underlying member method code with example usage: obj._safe_cast(cls, values, dtype, copy) and returns: values