I have 1-dimensional numpy array (array_
) and a Python list (list_).
The following code works, but is inefficient because slices involve an unnecessary copy (certainly for Python lists, and I believe also for numpy arrays?):
result = sum(array_[1:])
result = sum(list_[1:])
What's a good way to rewrite that?