Apply Lambda Function To Numpy Function Python Code