code: def __call__(self, array):
      if self.dtype is not None:
          assert array.dtype == self.dtype
      xp = cuda.get_array_module(array)
  
      in_c, out_c = array.shape[:2]
      assert in_c == out_c or out_c == 1
  
      ksize = None
      for k in array.shape[2:]:
          if ksize is None:
              ksize = k
          else:
              if ksize != k:
                  raise ValueError(
                      "ksize must be all same: {} != {}".format(
                          ksize, k
                      )
                  )
  
      filt = self._get_filter_func(
          ksize, ndim=array.ndim - 2, upsampling=self._upsampling
      )
      filt = xp.asarray(filt)
  
      array[...] = 0.0
      if out_c == 1:
          array[xp.arange(in_c), 0, ...] = filt
      else:
          array[xp.arange(in_c), xp.arange(out_c), ...] = filt
  
file_path: chainer/chainer/initializers/sampling.py
imports: import numpy
  from chainer.backends import cuda
  from chainer import initializer
label_desc: Use image node_id 2 for calling the _SamplingFilter obj's underlying member method code with example usage: obj.__call__(array) without return types