class_docstr: Array information needed by the scheduler.
  
  This contains information about one array used in the naive static
  schedule corresponding to the define-by-run code.
class_docstr_tok: ["Array","information","needed","by","the","scheduler",".","This","contains","information","about","one","array","used","in","the","naive","static","schedule","corresponding","to","the","define-by-run","code","."]
code: def __init__(self, array):
      # Weak reference to the array in the define-by-run code.
      self.weak_ref = weakref.ref(array)
      self.id = id(array)
      # The array (normal reference). Do not create in initializer.
      self.array = None
      self.shape = array.shape
      self.dtype = array.dtype
      # either numpy or cupy
      self.ndarray_module = chainer.backend.get_array_module(array)
      if self.ndarray_module is cuda.cupy:
          # device id, if available.
          self.device = cuda.get_device_from_array(array)
      else:
          # numpy (cpu)
          self.device = -1
      # todo: save array order ('C', 'F' as well?
      # It specifies the input variable corresponding
      # to this array as the tuple (pass_depth, in_var_index).
      self.in_var_index = None
      # It specifies the output variable corresponding
      # to this array as the tuple (pass_depth, out_var_index).
      self.out_var_index = None
      # todo: set in initializer as keyword arg?
      self.dynamically_allocated = False
      # If the array was returned as a dynamically allocated array
      # in the define-by-run code, this specifies the location
      # in the schedule as the tuple (pass_depth, sched_func_index)
      # where sched_func_index is the index of the corresponding
      # ScheduleInfo object in the StaticScheduleFunction's
      # self.schedule_info_list
      self.dynamic_allocation_index = None
      self.dynamic_allocation_pass_depth = None
      self.dynamic_deletion_index = None
      self.dynamic_deletion_pass_depth = None
      # This is the same as self.dynamic_allocation_index, but for the
      # case where the array was statically allocated in the
      # define-by-run code.
      self.static_allocation_index = None
      # If the array needs to be retained (was included in
      # retain_inputs/retain_outputs),
      # this will be set to True later.
      self.retain = False
  
imports: import sys
  import weakref
  import numpy
  import chainer
  from chainer.backends import cuda
  import chainer.function_node
label_desc: Use image node_id 1 to create a new ArrayInfo object from inherited base classes: object with example: obj = ArrayInfo(array)