code: def toarray(self):
          
          if self.mode == 'spark':
              return self.values.unchunk().toarray()
  
          if self.mode == 'local':
              return self.values.unchunk()
docs: Convert blocks to local ndarray