Converting dolfin petsc vector to petsc4py vector

Howdy,

So I’m using TAO, seems to be a slight type issue

tao.setInitial(w)

TypeError: Argument ‘x’ has incorrect type (expected petsc4py.PETSc.Vec, got dolfin.cpp.la.PETScVector)

Does anyone know how I can convert w appropriately so that its in petsc4py format?

Found on my own just have to use vec() on a dolfin petsc vector to convert it to a petsc4py vector.