For pyrf I needed to take data from a frequency plot, which could be any number of points, and present it as a spectrogram that fills the view size exactly. In the spectrogram I only care about the maximum values that appear in the range of frequencies represented by each pixel.

If I could just divide the number of source bins by an integer factor the solution would be simple:

returnnp.amax(data.reshape((-1,factor)),axis=1)

But I have to be able to handle any number of source bins and output that to any number of pixels.

I've been working on two new CKAN extensions that I'm really excited about. Since I helped build the custom metadata schema for http://data.gc.ca/ I've never been completely satisfied with the approach we took. These new extensions are the start of a proper solution to the compromises we made.