@@ -41,10 +41,10 @@ def to_matrix(
4141 if len (arr .shape ) > 2 :
4242 raise TooManyDimensionsError
4343
44- environment = f"{ style } matrix"
45-
4644 lines = _parse_lines (arr , num_format , scientific_notation )
4745
46+ environment = f"{ style } matrix"
47+
4848 rv = [f"\\ begin{{{ environment } }}" ]
4949 rv += [line .strip () + r" \\" for line in lines ]
5050 rv += [f"\\ end{{{ environment } }}" ]
@@ -96,17 +96,17 @@ def to_tabular(
9696
9797 if isinstance (col_align , list ) and len (col_align ) != n_cols :
9898 raise DimensionMismatchError (
99- "Number of `col_align` items doesn't match number of columns "
100- + f"( { len ( col_align ) } against { n_cols } )"
99+ f "Number of `col_align` items ( { len ( col_align ) } ) "
100+ + f"doesn't match number of columns ( { n_cols } )"
101101 )
102102
103103 if isinstance (col_align , str ):
104104 col_align = [col_align for _ in range (n_cols )]
105105
106106 if cols and len (cols ) != n_cols :
107107 raise DimensionMismatchError (
108- "Number of `cols` items doesn't match number of columns "
109- + f"( { len ( cols ) } against { n_cols } )"
108+ f "Number of `cols` items ( { len ( cols ) } ) "
109+ + f"doesn't match number of columns ( { n_cols } )"
110110 )
111111
112112 if not cols :
0 commit comments