code: def resize(self, new_size):
          
          if new_size == len(self):
              return
          else:
              self._saved = LimitedSizeDict(size_limit=2**5)
              new_arr = zeros(new_size, dtype=self.dtype)
              if len(self) <= new_size:
                  new_arr[0:len(self)] = self
              else:
                  new_arr[:] = self[0:new_size]
                  
              self._data = new_arr._data
docs: Resize self to new_size