code: def _copytoscratch(self, maps):
          
          try:
              for p in self.inputs:
                  self._scratch[p][:] = maps[p]
          except ValueError:
              # we'll get a ValueError if the scratch space isn't the same size
              # as the maps; in that case, re-create the scratch space with the
              # appropriate size and try again
              invals = maps[list(self.inputs)[0]]
              if isinstance(invals, numpy.ndarray):
                  shape = invals.shape
              else:
                  shape = len(invals)
              self._createscratch(shape)
              for p in self.inputs:
                  self._scratch[p][:] = maps[p]
docs: Copies the data in maps to the scratch space.
  
          If the maps contain arrays that are not the same shape as the scratch
          space, a new scratch space will be created.