Python: how to define a 2D array by comprehension by using function?
<p>I want to define a 2D (numpy) array such that <strong><em>cell(row,col) == row+col</em></strong> (or any other function of those 2 variables: row and column)</p>

<p>I'm looking for a functional solution, and my hope is that would not use any memory and that the resulting construct could be passed to any standard array manipulation function (matrix mult...)</p>

<p>Something doable in C++ with template metaprogramming.</p>
