A:=Matrix(2,3,1,datatype=float[8]);
                             [1.    1.    1.]
                        A := [              ]
                             [1.    1.    1.]

ArrayTools:-AddAlongDimension(A);

                               [2., 2.]

B:=Matrix(3,10,1,datatype=float[8]);

             [1. , 1. , 1. , 1. , 1. , 1. , 1. , 1. , 1. , 1.]
             [                                               ]
        B := [1. , 1. , 1. , 1. , 1. , 1. , 1. , 1. , 1. , 1.]
             [                                               ]
             [1. , 1. , 1. , 1. , 1. , 1. , 1. , 1. , 1. , 1.]

ArrayTools:-AddAlongDimension(B);

                             [3., 3., 3.]

In other words, it adds only the number of columns equal to the number of rows. With datatype=anything seems to be OK.

Alec


Please Wait...