Matlab If Statement Array In Python