[SciPy-user] bug in cookbook example: rebinning?

Angus McMorland amcmorl@gmail....
Wed Jan 31 14:50:47 CST 2007

Hi Christian,

On 01/02/07, Christian Meesters <meesters@uni-mainz.de> wrote:
> Does anybody know what 'xi' is in the the rebinning example (at
> http://www.scipy.org/Cookbook/Rebinning ; example No. 3 line 7 )?

Sorry, that was my bad. I wrote that routine before I knew a lot about
numpy or python, and didn't know many of the available helper
functions. xi was another small routine:

def xi(x,*args):
    return x

Looking back now, I've no idea why it's like that, and a much easier
solution is to use numpy.indices in place of nvals in the congrid
routine, since

nvals(i, dims) == n.indices(dims)[i]

I will go and make the change on the wiki now.

AJC McMorland, PhD Student
Physiology, University of Auckland

More information about the SciPy-user mailing list