I think I already commented on this, but cannot you just use a one liner:
```
A = densematrix(2, 2, {integer(1), integer(0), integer(0), integer(1)});
```