class_docstr: A simple Device/CPU Array object in runtime.
docstr: Set ndarray value
docstr_tok: ["Set","ndarray","value"]
code: def __setitem__(self, in_slice, value):
      """Set ndarray value"""
      if (
          not isinstance(in_slice, slice)
          or in_slice.start is not None
          or in_slice.stop is not None
      ):
          raise ValueError("Array only support set from numpy array")
      if isinstance(value, NDArrayBase):
          if value.handle is not self.handle:
              value.copyto(self)
      elif isinstance(value, (np.ndarray, np.generic)):
          self.copyfrom(value)
      else:
          raise TypeError("type %s not supported" % str(type(value)))
  
imports: from __future__ import absolute_import
  import ctypes
  import sys
  import numpy
  from .base import _FFI_MODE, _LIB, c_array, c_str, check_call, string_types
  from .runtime_ctypes import dgl_shape_index_t, DGLArray, DGLArrayHandle, DGLContext, DGLDataType, TypeCode
label_desc: Use image node_id 9 for calling the NDArrayBase obj's underlying member method code with example usage: obj.__setitem__(in_slice, value) without return types