as_backend_type

dolfin.cpp.la.as_backend_type(tensor, subclass=None)

Cast tensor to the given subclass, passing the wrong class is an error.