# Comprehension / Nested Comprehensions / typo in identity matrix

Issue #7
new

There is a problem here:

In python we can represent such a matrix by a list of lists, where each sub-list represents a row. A 3 by 3 matrix would be represented by the following list: {{{

# !python

[ [ 1, 0, 1 ], <- should be 1, 0, 0 [ 0, 1, 0 ], [ 0, 0, 1 ] ] }}}

The above matrix can be generated by the following comprehension: {{{

# !python

[ [ 1 if item_idx == row_idx else 0 for item_idx in range(0, 3) ] for row_idx in range(0, 3) ] }}}