unit_matrix(r,c) can return an evaluated matrix object.
authorRichard Kreckel <kreckel@ginac.de>
Tue, 24 Nov 2015 11:00:25 +0000 (12:00 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Tue, 24 Nov 2015 11:00:25 +0000 (12:00 +0100)
Cherry-picked from 052e9928.

ginac/matrix.cpp

index 3c46b17..82c2255 100644 (file)
@@ -1593,7 +1593,7 @@ ex diag_matrix(const lst & l)
 ex unit_matrix(unsigned r, unsigned c)
 {
        matrix &Id = *new matrix(r, c);
-       Id.setflag(status_flags::dynallocated);
+       Id.setflag(status_flags::dynallocated | status_flags::evaluated);
        for (unsigned i=0; i<r && i<c; i++)
                Id(i,i) = _ex1;