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.
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 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 | Exe
Hi Andrea
2008/5/24 Andrea Gavana <[EMAIL PROTECTED]>:
> Number Of Cells: 5
> -
> | Rank | Method Name | Execution Time | Relative Slowness |
> --
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 wh
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
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(xCe
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
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 Fortran-implem
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) & \
>>
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
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, http:
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]
>
>
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 t
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 chan
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 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 se
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 t
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 al
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
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 VT
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
___
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, bu
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 coo
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
25 matches
Mail list logo