Attempt to fix numpy.pop error

Numpy has no 'pop' support, but does support 'delete'.
Re-wrote the section of code that calls pop with delete
and returns the new array back to overwrite the old array.

(It may be more efficient to convert the array to a python list,
and work on that list. I don't see anything after the 'pop's that
needs a numpy array).