title: Chainer : object __array__ method not producing an array
body: <p>After training the VAE Model,i got the trained model.And also,save images is expected to be in each epoch folder but images are not saved.No idea where is the problem? and how to fix it ? </p>
  
  <pre><code>      ValueError                                Traceback (most recent call last)
        &lt;ipython-input-35-32d496ed4864&gt; in &lt;module&gt;()
            1 with chainer.no_backprop_mode():
            2     x1 = model(x)
      ----&gt; 3 save_images(x.data, 'train')
            4 save_images(x1.data, 'train_reconstructed')
  
  
      &lt;ipython-input-31-3c651ae7f2a2&gt; in save_images(x, filename)
           6     fig, ax = plt.subplots(3, 3, figsize=(9, 9), dpi=100)
           7     for ai, xi in zip(ax.flatten(), x):
     ----&gt; 8          ai.imshow(xi.reshape(512,512,4))
           9      fig.savefig(filename)
  
         ~/anaconda3/envs/chainer_p36/lib/python3.6/site- 
         packages/matplotlib/__init__.py in inner(ax, data, *args, **kwargs)
         1808                         "the Matplotlib list!)" % (label_namer, 
           func.__name__),
           1809                         RuntimeWarning, stacklevel=2)
        -&gt; 1810 return func(ax, *args, **kwargs)
           1811 
           1812         inner.__doc__ = _add_data_doc(inner.__doc__,
  
           ~/anaconda3/envs/chainer_p36/lib/python3.6/site- 
           packages/matplotlib/axes/_axes.py in imshow(self, X, cmap, norm, aspect, 
           interpolation, alpha, vmin, vmax, origin, extent, shape, filternorm, 
           filterrad, imlim, resample, url, **kwargs)
           5492                               resample=resample, **kwargs)
           5493 
        -&gt; 5494im.set_data(X)
           5495         im.set_alpha(alpha)
           5496         if im.get_clip_path() is None:
  
           ~/anaconda3/envs/chainer_p36/lib/python3.6/site- 
         packages/matplotlib/image.py in set_data(self, A)
            628         A : array-like
            629         """
        --&gt; 630  self._A = cbook.safe_masked_invalid(A, copy=True)
            631 
            632         if (self._A.dtype != np.uint8 and
  
         ~/anaconda3/envs/chainer_p36/lib/python3.6/site- 
              packages/matplotlib/cbook/__init__.py in 
         safe_masked_invalid(x, copy)
           782 
           783 def safe_masked_invalid(x, copy=False):
       --&gt; 784x = np.array(x, subok=True, copy=copy)
           785     if not x.dtype.isnative:
           786         # Note that the argument to `byteswap` is 'inplace',
  
           ValueError: object __array__ method not producing an array
  </code></pre>
  
  <p><em>a function of save image</em> </p>
  
  <pre><code>      def save_image(x, filename):
  
           fig, ax = plt.subplots(3, 3, figsize=(9, 9), dpi=100)
  
           for ai, xi in zip(ax.flatten(), x):
  
              ai.imshow(xi.reshape(512,512,4))
  
           fig.savefig(filename)
  </code></pre>
  
  <p>I excepted the output as same Image after being encoded and decoded.</p>