parameters: (self)
return_statement: return Device(Device.devtype2str[dev_typeid.value], dev_id.value)
docstring: Device context of the array.
  
          Examples
          --------
          >>> x = mx.nd.array([1, 2, 3, 4])
          >>> x.context
          cpu(0)
          >>> type(x.context)
          <class 'mxnet.device.Device'>
          >>> y = mx.nd.zeros((2,3), mx.gpu(0))
          >>> y.context
          gpu(0)
docstring_summary: Device context of the array.
docstring_tokens: Device context of the array .
function: def context(self):
          """Device context of the array.
  
          Examples
          --------
          >>> x = mx.nd.array([1, 2, 3, 4])
          >>> x.context
          cpu(0)
          >>> type(x.context)
          <class 'mxnet.device.Device'>
          >>> y = mx.nd.zeros((2,3), mx.gpu(0))
          >>> y.context
          gpu(0)
          """
          dev_typeid = ctypes.c_int()
          dev_id = ctypes.c_int()
          check_call(_LIB.MXNDArrayGetContext(
              self.handle, ctypes.byref(dev_typeid), ctypes.byref(dev_id)))
          return Device(Device.devtype2str[dev_typeid.value], dev_id.value)
function_tokens: def context ( self ) : dev_typeid = ctypes . c_int ( ) dev_id = ctypes . c_int ( ) check_call ( _LIB . MXNDArrayGetContext ( self . handle , ctypes . byref ( dev_typeid ) , ctypes . byref ( dev_id ) ) ) return Device ( Device . devtype2str [ dev_typeid . value ] , dev_id . value )