class_docstr: Array of integer (optional missing) values.
  
  .. versionadded:: 0.24.0
  
  .. warning::
  
     IntegerArray is currently experimental, and its API or internal
     implementation may change without warning.
  
  We represent an IntegerArray with 2 numpy arrays:
  
  - data: contains a numpy integer array of the appropriate dtype
  - mask: a boolean array holding a mask on the data, True is missing
  
  To construct an IntegerArray from generic array-like input, use
  :func:`pandas.array` with one of the integer dtypes (see examples).
  
  See :ref:`integer_na` for more.
  
  Parameters
  ----------
  values : numpy.ndarray
      A 1-d integer-dtype array.
  mask : numpy.ndarray
      A 1-d boolean-dtype array indicating missing values.
  copy : bool, default False
      Whether to copy the `values` and `mask`.
  
  Returns
  -------
  IntegerArray
  
  Examples
  --------
  Create an IntegerArray with :func:`pandas.array`.
  
  >>> int_array = pd.array([1, None, 3], dtype=pd.Int32Dtype())
  >>> int_array
  <IntegerArray>
  [1, NaN, 3]
  Length: 3, dtype: Int32
  
  String aliases for the dtypes are also available. They are capitalized.
  
  >>> pd.array([1, None, 3], dtype='Int32')
  <IntegerArray>
  [1, NaN, 3]
  Length: 3, dtype: Int32
  
  >>> pd.array([1, None, 3], dtype='UInt16')
  <IntegerArray>
  [1, NaN, 3]
  Length: 3, dtype: UInt16
docstr: Cast to a NumPy array or IntegerArray with 'dtype'.
  
  Parameters
  ----------
  dtype : str or dtype
      Typecode or data-type to which the array is cast.
  copy : bool, default True
      Whether to copy the data, even if not necessary. If False,
      a copy is made only if the old dtype does not match the
      new dtype.
  
  Returns
  -------
  array : ndarray or IntegerArray
      NumPy ndarray or IntergerArray with 'dtype' for its dtype.
  
  Raises
  ------
  TypeError
      if incompatible type with an IntegerDtype, equivalent of same_kind
      casting
docstr_tok: ["Cast","to","a","NumPy","array","or","IntegerArray","with","'dtype","'",".","Parameters","--","--","--","--","--","dtype",":","str","or","dtype","Typecode","or","data-type","to","which","the","array","is","cast",".","copy",":","bool",",","default","True","Whether","to","copy","the","data",",","even","if","not","necessary",".","If","False",",","a","copy","is","made","only","if","the","old","dtype","does","not","match","the","new","dtype",".","Returns","--","--","--","-","array",":","ndarray","or","IntegerArray","NumPy","ndarray","or","IntergerArray","with","'dtype","'","for","its","dtype",".","Raises","--","--","--","TypeError","if","incompatible","type","with","an","IntegerDtype",",","equivalent","of","same_kind","casting"]
code: def astype(self, dtype, copy=True):
      """
      Cast to a NumPy array or IntegerArray with 'dtype'.
  
      Parameters
      ----------
      dtype : str or dtype
          Typecode or data-type to which the array is cast.
      copy : bool, default True
          Whether to copy the data, even if not necessary. If False,
          a copy is made only if the old dtype does not match the
          new dtype.
  
      Returns
      -------
      array : ndarray or IntegerArray
          NumPy ndarray or IntergerArray with 'dtype' for its dtype.
  
      Raises
      ------
      TypeError
          if incompatible type with an IntegerDtype, equivalent of same_kind
          casting
      """
  
      # if we are astyping to an existing IntegerDtype we can fastpath
      if isinstance(dtype, _IntegerDtype):
          result = self._data.astype(dtype.numpy_dtype, copy=False)
          return type(self)(result, mask=self._mask, copy=False)
  
      # coerce
      data = self._coerce_to_ndarray()
      return astype_nansafe(data, dtype, copy=None)
  
imports: import copy
  import sys
  import warnings
  import numpy
  from pandas._libs import lib
  from pandas.compat import range, set_function_name, string_types
  from pandas.util._decorators import cache_readonly
  from pandas.core.dtypes.base import ExtensionDtype
  from pandas.core.dtypes.cast import astype_nansafe
  from pandas.core.dtypes.common import is_bool_dtype, is_float, is_float_dtype, is_integer, is_integer_dtype, is_list_like, is_object_dtype, is_scalar
  from pandas.core.dtypes.dtypes import register_extension_dtype
  from pandas.core.dtypes.generic import ABCIndexClass, ABCSeries
  from pandas.core.dtypes.missing import isna, notna
  from pandas.core import nanops
  from pandas.core.arrays import ExtensionArray, ExtensionOpsMixin
  from pandas.core.tools.numeric import to_numeric
label_desc: Use image node_id 19 for calling the IntegerArray obj's underlying member method code with example usage: obj.astype(dtype, copy) and returns: astype_nansafe, type