Numpy Loop Through Array Powershell Try Finally In Python