File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -768,12 +768,15 @@ =head2 convert_to_array_ref {
768768
769769sub convert_to_array_ref {
770770 my $input = shift ;
771- if (Value::classMatch($input ," Matrix" )) {
772- $input = [$input -> value];
771+ if (Value::isValue($input ) and Value::classMatch($input ," Matrix" )) {
772+ # handles Value::Matrix (MathObject matrices)
773+ $input = [$input -> value]; # convert an array to an array_ref (see POD comment above)
773774 } elsif (ref ($input ) eq ' Matrix' ) {
775+ # handles wwMatrix objects (old style)
774776 $input = $input -> array_ref;
775777 } elsif (ref ($input ) =~/ ARRAY/ ) {
776778 # no change to input value
779+ # handles raw perl array_ref types
777780 } else {
778781 WARN_MESSAGE(" This does not appear to be a matrix " );
779782 }
You can’t perform that action at this time.
0 commit comments