fix as_vector, as_matrix, as_array