From: Travis O. <oli...@ie...> - 2002-01-28 06:09:29
|
> In the process of 'porting' Konrad Hinsen's Histogram class (from the > Scientific package) to N dimensions, I ran across the problem of how to > apply a function to an array for a specified set of indices. If I understand what you are trying to do, there is a function called arraymap in the SciPy package (special module) (it was in the Numeric source for a short time but I think we decided to take it out --- I can't remember why). I think that using this function and a combination of take and put can do what you describe. It is available as scipy.special.arraymap Best regards, Travis Oliphant |