[Numpy-discussion] upsample or scale an array

2011-12-03 Thread Robin Kraft
:51 AM, Warren Weckesser wrote: On Sat, Dec 3, 2011 at 12:35 AM, Robin Kraft wrote: I need to take an array - derived from raster GIS data - and upsample or scale it. That is, I need to repeat each value in each dimension so that, for example, a 2x2 array becomes a 4x4 array as follows

Re: [Numpy-discussion] upsample or scale an array

2011-12-03 Thread Robin Kraft
there, but it seems doable. Anyone know what combination of manipulations would work with the result of np.tile? -Robin On Dec 3, 2011, at 11:05 AM, Olivier Delalleau wrote: You can also use numpy.tile -=- Olivier 2011/12/3 Robin Kraft Thanks Warren, this is great, and even handles

Re: [Numpy-discussion] upsample or scale an array

2011-12-03 Thread Robin Kraft
], [1, 1, 2, 2], [3, 3, 4, 4], [3, 3, 4, 4]]]) On Dec. 3, 2011, at 12:50PM, Derek Homeier wrote: On 03.12.2011, at 6:22PM, Robin Kraft wrote: That does repeat the elements, but doesn't get them into the desired order. In [4]: print a [[1 2] [3 4]] In [7

[Numpy-discussion] upsample or scale an array

2011-12-02 Thread Robin Kraft
I need to take an array - derived from raster GIS data - and upsample or scale it. That is, I need to repeat each value in each dimension so that, for example, a 2x2 array becomes a 4x4 array as follows: [[1, 2], [3, 4]] becomes [[1,1,2,2], [1,1,2,2], [3,3,4,4] [3,3,4,4]] It seems like

Re: [Numpy-discussion] Where did the github numpy repository go?

2010-11-14 Thread Robin Kraft
Git is having some kind of major outage: http://status.github.com/ The site and git access is unavailable due to a database failure. We're researching the issue. On Nov 14, 2010, at 3:29 PM, numpy-discussion-requ...@scipy.org wrote: Message: 5 Date: Sun, 14 Nov 2010 13:29:03 -0700 From:

Re: [Numpy-discussion] summarizing blocks of an array using a moving window

2010-07-22 Thread Robin Kraft
Vincent, Pauli, From: Vincent Schut sc...@sarvision.nl - an other option would be some smart reshaping, which finally gives you a [y//2, x//2, 2, 2] array, which you could then reduce to calculate stats (mean, std, etc) on the last two axes. I *think* you'd have to first reshape both x

[Numpy-discussion] summarizing blocks of an array using a moving window

2010-07-21 Thread Robin Kraft
Hello all, The short version: For a given NxN array, is there an efficient way to use a moving window to collect a summary statistic on a chunk of the array, and insert it into another array? The long version: I am trying to resample an image loaded with GDAL into an NxN array. Note that this