Numpy Could Not Broadcast Input Array Matlab For Loop