Hi Stefan All,
On Sat, May 24, 2008 at 8:11 PM, Stéfan van der Walt wrote:
Hi Andrea
2008/5/24 Andrea Gavana [EMAIL PROTECTED]:
Number Of Cells: 5
-
| Rank | Method Name | Execution Time
Hi Andrea
2008/5/25 Andrea Gavana [EMAIL PROTECTED]:
When you bench the Cython code, you'll have to take out the Python
calls (for checking dtype etc.), otherwise you're comparing apples and
oranges. After I tweaked it, it ran roughly the same time as
Francesc's version. But like I
Hi Stefan All,
On Sun, May 25, 2008 at 8:59 PM, Stéfan van der Walt wrote:
Hi Andrea
2008/5/25 Andrea Gavana [EMAIL PROTECTED]:
When you bench the Cython code, you'll have to take out the Python
calls (for checking dtype etc.), otherwise you're comparing apples and
oranges. After I
Hi All,
On Fri, May 23, 2008 at 4:50 PM, Andrea Gavana wrote:
Hi Peter All,
On Fri, May 23, 2008 at 4:16 PM, Peter Creasey wrote:
Hi Andrea,
2008/5/23 Andrea Gavana [EMAIL PROTECTED]:
And so on. The probelm with this approach is that I lose the original
indices for which I want all the
Hi Andrea
2008/5/24 Andrea Gavana [EMAIL PROTECTED]:
Number Of Cells: 5
-
| Rank | Method Name | Execution Time | Relative Slowness |
Hi Stefan All,
On Fri, May 23, 2008 at 1:02 AM, Stéfan van der Walt wrote:
Hi Andrea
2008/5/23 Andrea Gavana [EMAIL PROTECTED]:
Thank you very much for this! I am going to try it and time it,
comparing it with the other implementations. I think I need to study a
bit your code as I know
Hi Andrea,
2008/5/23 Andrea Gavana [EMAIL PROTECTED]:
And so on. The probelm with this approach is that I lose the original
indices for which I want all the inequality tests to succeed:
To have the original indices you just need to re-index your indices, as it were
idx = flatnonzero(xCent =
Hi Peter All,
On Fri, May 23, 2008 at 4:16 PM, Peter Creasey wrote:
Hi Andrea,
2008/5/23 Andrea Gavana [EMAIL PROTECTED]:
And so on. The probelm with this approach is that I lose the original
indices for which I want all the inequality tests to succeed:
To have the original indices you
Hi Andrea
2008/5/22 Andrea Gavana [EMAIL PROTECTED]:
I am building some 3D grids for visualization starting from a much
bigger grid. I build these grids by satisfying certain conditions on
x, y, z coordinates of their cells: up to now I was using VTK to
perform this operation, but VTK is
Hi Stefan All,
On Thu, May 22, 2008 at 12:29 PM, Stéfan van der Walt wrote:
Hi Andrea
2008/5/22 Andrea Gavana [EMAIL PROTECTED]:
I am building some 3D grids for visualization starting from a much
bigger grid. I build these grids by satisfying certain conditions on
x, y, z coordinates of
A Thursday 22 May 2008, Andrea Gavana escrigué:
Hi All,
I am building some 3D grids for visualization starting from a
much bigger grid. I build these grids by satisfying certain
conditions on x, y, z coordinates of their cells: up to now I was
using VTK to perform this operation, but VTK
On Thu, 22 May 2008, Andrea Gavana apparently wrote:
# Filter cells which do not satisfy Z requirements:
zReq = zMin = zCent = zMax
This seems to raise a question:
should numpy arrays support this standard Python idiom?
Cheers,
Alan Isaac
___
2008/5/22 Andrea Gavana [EMAIL PROTECTED]:
Hi All,
I am building some 3D grids for visualization starting from a much
bigger grid. I build these grids by satisfying certain conditions on
x, y, z coordinates of their cells: up to now I was using VTK to
perform this operation, but VTK is
Hi Francesc All,
On Thu, May 22, 2008 at 1:04 PM, Francesc Alted wrote:
I don't know if this is what you want, but you can get the boolean
arrays separately, do the intersection and finally get the interesting
values (by using fancy indexing) or coordinates (by using .nonzero()).
Here it is
Alan G Isaac wrote:
On Thu, 22 May 2008, Andrea Gavana apparently wrote:
# Filter cells which do not satisfy Z requirements:
zReq = zMin = zCent = zMax
This seems to raise a question:
should numpy arrays support this standard Python idiom?
It would be nice, but alas it
Hi Andrea
2008/5/22 Andrea Gavana [EMAIL PROTECTED]:
You clearly have a large dataset, otherwise speed wouldn't have been a
concern to you. You can do your operation in one pass over the data,
and I'd suggest you try doing that with Cython or Ctypes. If you need
an example on how to access
On Thu, May 22, 2008 at 12:26 PM, Stéfan van der Walt [EMAIL PROTECTED] wrote:
Just to clarify things in my mind: is VTK *that* slow? I find that
surprising, since it is written in C or C++.
Performance can depend more on the design of the code than the
implementation language. There are
Hi All,
On Thu, May 22, 2008 at 7:46 PM, Robert Kern wrote:
On Thu, May 22, 2008 at 12:26 PM, Stéfan van der Walt [EMAIL PROTECTED]
wrote:
Just to clarify things in my mind: is VTK *that* slow? I find that
surprising, since it is written in C or C++.
Performance can depend more on the
Andrea Gavana wrote:
By the way, about the solution Francesc posted:
xyzReq = (xCent = xMin) (xCent = xMax) \
(yCent = yMin) (yCent = yMax) \
(zCent = zMin) (zCent = zMax)
xyzReq = numpy.nonzero(xyzReq)[0]
Do you think is there any chance that a C
On Thu, May 22, 2008 at 2:16 PM, Andrea Gavana [EMAIL PROTECTED] wrote:
By the way, about the solution Francesc posted:
xyzReq = (xCent = xMin) (xCent = xMax) \
(yCent = yMin) (yCent = yMax) \
(zCent = zMin) (zCent = zMax)
You could implement this with inplace
Hi Andrea
2008/5/22 Andrea Gavana [EMAIL PROTECTED]:
By the way, about the solution Francesc posted:
xyzReq = (xCent = xMin) (xCent = xMax) \
(yCent = yMin) (yCent = yMax) \
(zCent = zMin) (zCent = zMax)
xyzReq = numpy.nonzero(xyzReq)[0]
Do you think is there
Stéfan van der Walt wrote:
I wrote a quick proof of concept (no guarantees).
Thanks for the example -- I like how Cython understands ndarrays!
It looks like this code would break if x,y,and z are not C-contiguous --
should there be a check for that?
-Chris
here (download using bzr,
Hi Chris and All,
On Thu, May 22, 2008 at 8:40 PM, Christopher Barker wrote:
Andrea Gavana wrote:
By the way, about the solution Francesc posted:
xyzReq = (xCent = xMin) (xCent = xMax) \
(yCent = yMin) (yCent = yMax) \
(zCent = zMin) (zCent = zMax)
xyzReq =
Hi Stefan,
On Thu, May 22, 2008 at 10:23 PM, Stéfan van der Walt wrote:
Hi Andrea
2008/5/22 Andrea Gavana [EMAIL PROTECTED]:
By the way, about the solution Francesc posted:
xyzReq = (xCent = xMin) (xCent = xMax) \
(yCent = yMin) (yCent = yMax) \
(zCent = zMin)
Hi Andrea
2008/5/23 Andrea Gavana [EMAIL PROTECTED]:
Thank you very much for this! I am going to try it and time it,
comparing it with the other implementations. I think I need to study a
bit your code as I know almost nothing about Cython :-D
That won't be necessary -- the
25 matches
Mail list logo