title: Create a numpy matrix with elements as a function of indices
body: <p>How can I create a numpy matrix with its elements being a function of its indices?
  For example, a multiplication table: <code>a[i,j] = i*j</code></p>
  
  <p>An Un-numpy and un-pythonic would be to create an array of zeros and then loop through.</p>
  
  <p>There is no doubt that there is a better way to do this, without a loop.</p>
  
  <p>However, even better would be to create the matrix straight-away.</p>