Python Function Returning Unexpected Values When Vectorizing Over

Python Function Returning Unexpected Values When Vectorizing Over