|
111 | 111 | ' # should be kept in sync with the same function' |
112 | 112 | ' # defined in inst/private/python_header.py' |
113 | 113 | ' sys.stderr.write("pydebug: " + str(l) + "\n")' |
114 | | - 'def make_matrix_or_array(it_of_it, dbg_no_array=False):' |
| 114 | + 'def make_2d_sym(it_of_it, dbg_matrix_only=False):' |
115 | 115 | ' # should be kept in sync with the same function' |
116 | 116 | ' # defined in inst/private/python_header.py' |
117 | | - ' # FIXME: dbg_no_array is currently used for debugging,' |
118 | | - ' # remove it once sympy drops non-Expr supp in Matrix' |
| 117 | + ' # FIXME: dbg_matrix_only is used for debugging, remove' |
| 118 | + ' # it once sympy drops non-Expr support in Matrix' |
119 | 119 | ' """' |
120 | | - ' Given an iterable of iterables of syms IT_OF_IT' |
121 | | - ' If all elements of IT_OF_IT are Expr,' |
122 | | - ' construct the corresponding Matrix.' |
123 | | - ' Otherwise, construct the corresponding 2D array.' |
| 120 | + ' Given an iterable of iterables of syms IT_OF_IT.' |
| 121 | + ' If all elements of IT_OF_IT are Expr, construct the' |
| 122 | + ' corresponding Matrix. Otherwise, construct the' |
| 123 | + ' corresponding non-Matrix 2D sym.' |
124 | 124 | ' """' |
125 | 125 | ' ls_of_ls = [[elt for elt in it] for it in it_of_it]' |
126 | 126 | ' elts = flatten(ls_of_ls, levels=1)' |
127 | 127 | ' if Version(spver) <= Version("1.11.1"):' |
128 | 128 | ' # never use Array on older SymPy' |
129 | | - ' dbg_no_array = True' |
130 | | - ' if (dbg_no_array' |
| 129 | + ' dbg_matrix_only = True' |
| 130 | + ' if (dbg_matrix_only' |
131 | 131 | ' or all(isinstance(elt, Expr) for elt in elts)):' |
132 | 132 | ' return Matrix(ls_of_ls)' |
133 | 133 | ' else:' |
134 | | - ' dbout(f"make_matrix_or_array: making 2D Array...")' |
| 134 | + ' dbout(f"make_2d_sym: constructing 2D sym...")' |
135 | 135 | ' return Array(ls_of_ls)' |
136 | 136 | }, newl)) |
137 | 137 | have_headers = true; |
|
0 commit comments