Closed ljubobratovicrelja closed 8 years ago
I've been trying to achieve this for few hours, and just after posting the issue here I got the solution - matrix.windows(m, n).strided!(0, 1)(k, k)
seems to be doing the job.
Sorry for spamming.
Maybe put this in the docs somewhere?
Well, in blocks
' documentation it's clearly noted it's non-ovelapping blocking of tensor. My first hint was to look around blocks
, and wasn't thinking even remotely windows
would solve the problem. And that is most probably the reason for my confusion, and why I was not able to come up with a solution for a period of time.
So, maybe a hint in the blocks
description about this would be good. Also an unittest example on this in windows
section. @9il @thewilsonator if you both agree, I would like to add this.
agree, please open a Phobos PR
agree, please open a Phobos PR
Will do, tnx.
Is it possible to achieve this with current
mir.ndslice.selection
API? For example, I'd like to divide matrix into m-by-n blocks, but I'd like blocks to overlap by k elements, where k < m && k < n.Something like this:
Hope example is understandable. :)