Closed cbm755 closed 1 year ago
In any case, I think we should keep the high-level function so that we use the low-level function only when we have to. I think it's quite common for types / data structures / classes to have multiple constructors. WDYT?
Let's discuss here.
shape=
kwarg is passed, we expect a flat array).I was working toward 3 but I don't feel that strongly about it. I don't think list-of-lists is possible in general b/c of the reasons outlined elsewhere (and even in the help of SymPy's .tolist()
operator).
How about make_2d_sym_list_of_lists
flattens and then calls _make_2d_sym
? That seems the easiest way to keep both.
However, I think every caller of make_2d_sym_list_of_lists
will need to think very carefully if they handle empties correctly: which is why I think it might not be worth keeping.
Merging this for now, above decisions not really resolved but I don't think this hurts
Related to #1236. I don't see a problem with the list-of-lists approach, but there are only 2 routines using it so we can delete some code if we port them to flat + shape.
@alexvong1995 can you port
@sym/private/mat_rclist_access.m
to_make_2d_sym
? And then delete themake_2d_sym
function.