unit_matrix(r,c) can return an evaluated matrix object.
authorRichard Kreckel <kreckel@ginac.de>
Mon, 23 Nov 2015 20:38:30 +0000 (21:38 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Mon, 23 Nov 2015 20:38:30 +0000 (21:38 +0100)
ginac/matrix.cpp

index 871c3f1..52a1f1b 100644 (file)
@@ -1589,7 +1589,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;