Example #1
0
 def __setslice__(self, i, j, value):
     ndarray.__setslice__(self, i, j, value)
     if j == maxint:
         j = len(self)
     if hasattr(value, "__getitem__"):  # setting to a list
         for index in range(i, j):
             setattr(self._list[index], self._attr, value[index])
     else:
         for index in range(i, j):
             setattr(self._list[index], self._attr, value)
Example #2
0
 def __setslice__(self, i, j, value):
     ndarray.__setslice__(self, i, j, value)
     if j == maxint:
         j = len(self)
     if hasattr(value, "__getitem__"):  # setting to a list
         for index in range(i, j):
             setattr(self._list[index], self._attr, value[index])
     else:
         for index in range(i, j):
             setattr(self._list[index], self._attr, value)
Example #3
0
 def __setslice__(self, i, j, value):
     """Set slice equal to given value(s)"""
     ndarray.__setslice__(self, i, j, value)
Example #4
0
 def __setslice__(self, i, j, value):
     """Set slice equal to given value(s)"""
     ndarray.__setslice__(self, i, j, value)
Example #5
0
 def _extend(self, other):
     old_size = len(self)
     new_size = old_size + len(other)
     self.resize(new_size, refcheck=False)
     ndarray.__setslice__(self, old_size, new_size, other)
Example #6
0
 def _extend(self, other):
     old_size = len(self)
     new_size = old_size + len(other)
     self.resize(new_size, refcheck=False)
     ndarray.__setslice__(self, old_size, new_size, other)