Allow as_tensor(as_tensor(A)), as_matrix(as_matrix(A)), and as_vector(as_vector(v)) in user code.