Re: [Numpy-discussion] diff of find of diff trick

2007-10-11 Thread Norbert Nemec
Basically, what you want to do is a histogram. Numpy has that functionality built in. However: the version built in to numpy is about as suboptimal as yours. The problem is the unnecessary sorting of the data. In principle, a histogram does not need any sorting, so it could be done in strictly

[Numpy-discussion] diff of find of diff trick

2007-10-09 Thread Robin
Hello, As a converting MATLAB user I am bringing over some of my code. A core function I need is to sample the probability distribution of a given set of data. Sometimes these sets are large so I would like to make it as efficient as possible. (the data are integers representing members of a