class_docstr: Device for Intel64 (Intel Architecture) backend with iDeep
class_docstr_tok: ["Device","for","Intel64","(","Intel","Architecture",")","backend","with","iDeep"]
code: def send_array(self, array):
      if isinstance(array, ideep.mdarray):
          return array
  
      if not isinstance(array, numpy.ndarray):
          array = _cpu._to_cpu(array)  # to numpy.ndarray
  
      if (
          isinstance(array, numpy.ndarray)
          and array.ndim in (1, 2, 4)
          and 0 not in array.shape
      ):
          # TODO(kmaehashi): Remove ndim validation once iDeep has fixed.
          # Currently iDeep only supports (1, 2, 4)-dim arrays.
          # Note that array returned from `ideep.array` may not be an
          # iDeep mdarray, e.g., when the dtype is not float32.
          array = ideep.array(array, itype=ideep.wgt_array)
      return array
  
file_path: chainer/chainer/backends/intel64.py
imports: from __future__ import absolute_import
  import numpy
  import chainer
  from chainer import _backend
  from chainer.backends import _cpu
  from chainer.configuration import config
label_desc: Use image node_id 5 for calling the Intel64Device obj's underlying member method code with example usage: obj.send_array(array) and returns: array, array