On 17 September 2012 23:31, Wanderer <wande...@dialup4less.com> wrote:
> I need to divide a 512x512 image array with the first horizontal and > vertical division 49 pixels in. Then every 59 pixels in after that. hsplit > and vsplit want to start at the edges and create a bunch of same size > arrays. Is there a command to chop off different sized arrays? > hsplits = [49] sum_hsplits = 49 while sum_hsplits < 512: hsplits.append(sum_hsplits) sum_hsplits += 59 np.split(np.random.rand(512), hsplits) If I understand correctly, this is a one-dimensional version of what you want. Extending this to the second dimension should be quite easy. However, I am not sure if I do understand what you want. Could you elaborate on what you are trying to achieve?
-- http://mail.python.org/mailman/listinfo/python-list