code: def make_multichannel_2d_array(ndarray, order):
      """Channel count has to be the first dimension of the C{ndarray}."""
  
      descr = ArrayDescriptor()
  
      if order.upper() == "C":
          h, w, num_channels = ndarray.shape
          stride = 0
      elif order.upper() == "F":
          num_channels, w, h = ndarray.shape
          stride = 2
      else:
          raise LogicError("order must be either F or C")
  
      descr.width = w
      descr.height = h
      descr.format = dtype_to_array_format(ndarray.dtype)
      descr.num_channels = num_channels
  
      ary = Array(descr)
  
      copy = Memcpy2D()
      copy.set_src_host(ndarray)
      copy.set_dst_array(ary)
      copy.width_in_bytes = (
          copy.src_pitch
      ) = copy.dst_pitch = ndarray.strides[stride]
      copy.height = h
      copy(aligned=True)
  
      return ary
  
imports: import os
  import numpy
label_desc: Use image node_id 19 for calling a global function with example usage: make_multichannel_2d_array(ndarray, order) and returns: ary