code: def toseries(self, chunk_size='auto'):
          
          from thunder.series.series import Series
  
          if chunk_size is 'auto':
              chunk_size = str(max([int(1e5/self.shape[0]), 1]))
  
          n = len(self.shape) - 1
          index = arange(self.shape[0])
  
          if self.mode == 'spark':
              return Series(self.values.swap((0,), tuple(range(n)), size=chunk_size), index=index)
  
          if self.mode == 'local':
              return Series(self.values.transpose(tuple(range(1, n+1)) + (0,)), index=index)
docs: Converts to series data.
  
          This method is equivalent to images.toblocks(size).toSeries().
  
          Parameters
          ----------
          chunk_size : str or tuple, size of image chunk used during conversion, default = 'auto'
              String interpreted as memory size (in kilobytes, e.g. '64').
              The exception is the string 'auto', which will choose a chunk size to make the
              resulting blocks ~100 MB in size. Tuple of ints interpreted as 'pixels per dimension'.
              Only valid in spark mode.