cleans up numeric arrays after removing a value