Curl of a vector in python