Use the online line matrix generation

Use syntax [[value] * col for ...range(row)] instead of nested for loops.