iarray.IArray.delete#
- IArray.delete(delete_len, axis=0, start=None)#
Delete
delete_len
positions along theaxis
from thestart
.- Parameters
Notes
If
delete_len
is not a multiple of chunks[axis],start
must be either None or shape[axis] - delete_len (which are equivalent). Otherwise,start
must also be a multiple of chunks[axis].For example, let’s suppose that we have an array with shape = [20, 20] and chunks = [7, 7]. If delete_len = 5 and axis = 0, because
delete_len
is not a multiple of chunks[axis],start
must be None or shape[axis] - delete_len = 15. In both cases, the deleted elements will be the same (those at the end) and the new shape will be [15, 20]. If we would like to delete some elements in the middle of the array,start
anddelete_len
both must be a multiple of chunks[axis]. So the only possibilities is this particular case would be start = 0 and delete_len = 7 or delete_len = 14 which would give an array with shape [13, 20] or [6, 20]. Or start = 7 and delete_len = 7 which would give an array with shape [13, 20].