Use Scalar type of matrix for assertions s.t. this works with Ceres Jet