parameters: (self, obj)
return_statement: return ptr
docstring: Return the data pointer cast to a particular c-types object.
          For example, calling ``self._as_parameter_`` is equivalent to
          ``self.data_as(ctypes.c_void_p)``. Perhaps you want to use the data as a
          pointer to a ctypes array of floating-point data:
          ``self.data_as(ctypes.POINTER(ctypes.c_double))``.
  
          The returned pointer will keep a reference to the array.
docstring_summary: Return the data pointer cast to a particular c-types object.
          For example, calling ``self._as_parameter_`` is equivalent to
          ``self.data_as(ctypes.c_void_p)``. Perhaps you want to use the data as a
          pointer to a ctypes array of floating-point data:
          ``self.data_as(ctypes.POINTER(ctypes.c_double))``.
docstring_tokens: Return the data pointer cast to a particular c - types object . For example calling self . _as_parameter_ is equivalent to self . data_as ( ctypes . c_void_p ) . Perhaps you want to use the data as a pointer to a ctypes array of floating - point data : self . data_as ( ctypes . POINTER ( ctypes . c_double )) .
function: def data_as(self, obj):
          """
          Return the data pointer cast to a particular c-types object.
          For example, calling ``self._as_parameter_`` is equivalent to
          ``self.data_as(ctypes.c_void_p)``. Perhaps you want to use the data as a
          pointer to a ctypes array of floating-point data:
          ``self.data_as(ctypes.POINTER(ctypes.c_double))``.
  
          The returned pointer will keep a reference to the array.
          """
          # _ctypes.cast function causes a circular reference of self._data in
          # self._data._objects. Attributes of self._data cannot be released
          # until gc.collect is called. Make a copy of the pointer first then let
          # it hold the array reference. This is a workaround to circumvent the
          # CPython bug https://bugs.python.org/issue12836
          ptr = self._ctypes.cast(self._data, obj)
          ptr._arr = self._arr
          return ptr
function_tokens: def data_as ( self , obj ) : # _ctypes.cast function causes a circular reference of self._data in # self._data._objects. Attributes of self._data cannot be released # until gc.collect is called. Make a copy of the pointer first then let # it hold the array reference. This is a workaround to circumvent the # CPython bug https://bugs.python.org/issue12836 ptr = self . _ctypes . cast ( self . _data , obj ) ptr . _arr = self . _arr return ptr