How can I create a numpy matrix with its elements being a function of its indices? For example, a multiplication table: a[i,j] = i*j
a[i,j] = i*j
An Un-numpy and un-
I'm away from my python at the moment, but does this one work?
array( [ [ i*j for j in xrange(5)] for i in xrange(5)] )