def extend(self, items):
        """
        extend the numpy array with multiple items, growing the wrapped array
        if necessary
        """
        items = np.array(items)
        pos = items.shape[0] + self.logical_size
        if pos > self.physical_size:
            # more physical memory is needed than has been allocated so far
            amt = self._tmp_size()
            if self.physical_size + amt < pos:
                # growing the memory by the prescribed amount still won't 
                # make enough room. Allocate exactly as much memory as is needed
                # to accommodate items
                amt = pos - self.physical_size

            # actually grow the array
            self._grow(amt=amt)

        stop = self._position + items.shape[0]
        self._data[self._position: stop] = items
        self._position += items.shape[0]
        return self
def extend ( self , items ) : items = np . array ( items ) pos = items . shape [ 0 ] + self . logical_size if pos > self . physical_size : amt = self . _tmp_size ( ) if self . physical_size + amt < pos : amt = pos - self . physical_size self . _grow ( amt = amt ) stop = self . _position + items . shape [ 0 ] self . _data [ self . _position : stop ] = items self . _position += items . shape [ 0 ] return self
extend the numpy array with multiple items, growing the wrapped array
        if necessary