Re: [Numpy-discussion] Adjacent matrix

2011-06-15 Thread Thiago Franco Moraes
On Tue, Jun 14, 2011 at 6:30 PM, Gael Varoquaux wrote: > On Tue, Jun 14, 2011 at 10:29:38AM -0300, Thiago Franco Moraes wrote: >> I don't know if I understand. The idea is to use _make_edges_3d to >> give me the connectivity, isn't it? Like for example, a 3x3 image: > >> 0, 1, 2 >> 3, 4, 5 >> 6, 7

Re: [Numpy-discussion] Adjacent matrix

2011-06-14 Thread Gael Varoquaux
On Tue, Jun 14, 2011 at 10:29:38AM -0300, Thiago Franco Moraes wrote: > I don't know if I understand. The idea is to use _make_edges_3d to > give me the connectivity, isn't it? Like for example, a 3x3 image: > 0, 1, 2 > 3, 4, 5 > 6, 7, 8 > If I use _make_edges_3d(3, 3) I get: > array([[0, 1, 3,

Re: [Numpy-discussion] Adjacent matrix

2011-06-14 Thread Thiago Franco Moraes
On Tue, Jun 14, 2011 at 11:09 AM, Luis Pedro Coelho wrote: > On Tuesday, June 14, 2011 08:50:47 AM Thiago Franco Moraes wrote: >> On Tue, Jun 14, 2011 at 8:06 AM, Luis Pedro Coelho wrote: >> > On Monday, June 13, 2011 03:55:46 PM Thiago Franco Moraes wrote: >> >> "Find all of the grid points in t

Re: [Numpy-discussion] Adjacent matrix

2011-06-14 Thread Luis Pedro Coelho
On Tuesday, June 14, 2011 08:50:47 AM Thiago Franco Moraes wrote: > On Tue, Jun 14, 2011 at 8:06 AM, Luis Pedro Coelho wrote: > > On Monday, June 13, 2011 03:55:46 PM Thiago Franco Moraes wrote: > >> "Find all of the grid points in that lie adjacent to one or more grid > >> points of opposite valu

Re: [Numpy-discussion] Adjacent matrix

2011-06-14 Thread Thiago Franco Moraes
On Mon, Jun 13, 2011 at 5:03 PM, Gael Varoquaux wrote: > Hi, > > You can probably find some inspiration from > https://github.com/scikit-learn/scikit-learn/blob/master/scikits/learn/feature_extraction/image.py > > Gaël Hi Gaël, I don't know if I understand. The idea is to use _make_edges_3d to g

Re: [Numpy-discussion] Adjacent matrix

2011-06-14 Thread Thiago Franco Moraes
On Tue, Jun 14, 2011 at 8:06 AM, Luis Pedro Coelho wrote: > On Monday, June 13, 2011 03:55:46 PM Thiago Franco Moraes wrote: >> "Find all of the grid points in that lie adjacent to one or more grid >> points of opposite values." >> >> This is the code used to calculate that matrix: > [spin] >> Whe

Re: [Numpy-discussion] Adjacent matrix

2011-06-14 Thread Luis Pedro Coelho
On Monday, June 13, 2011 03:55:46 PM Thiago Franco Moraes wrote: > "Find all of the grid points in that lie adjacent to one or more grid > points of opposite values." > > This is the code used to calculate that matrix: [spin] > Where nx, ny and nz are the x, y, z dimensions from the "im" input > b

Re: [Numpy-discussion] Adjacent matrix

2011-06-13 Thread Gael Varoquaux
Hi, You can probably find some inspiration from https://github.com/scikit-learn/scikit-learn/blob/master/scikits/learn/feature_extraction/image.py Gaël ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/n

[Numpy-discussion] Adjacent matrix

2011-06-13 Thread Thiago Franco Moraes
Hi all, I'm reproducing a algorithm from a paper. This paper takes as input a binary volumetric matrix. In a step from this paper, from this binary volumetric matrix a adjacent matrix is calculated, thisadjacent matrix is calculated as bellow: "Find all of the grid points in that lie adjacent to