[Numpy-discussion] from_function

Neal Becker ndbecker2@gmail....
Tue Feb 3 06:24:40 CST 2009


I've been using something I wrote:

coef_from_function (function, delta, size)
which does (c++ code):

  double center = double(size-1)/2;
  for (int i = 0; i < size; ++i)
    coef[i] = call<value_t> (func, double(i - center) * delta);

I thought to translate this to np.fromfunction.  It seems fromfunction is 
not as flexible, it uses only a fixed integer grid?




More information about the Numpy-discussion mailing list