Gaetan de Menten :
> On Fri, Oct 22, 2010 at 10:53, Francesc Alted <faltet@...> wrote:
>> A Friday 22 October 2010 10:45:13 Francesc Alted escrigué:
>>> A Friday 22 October 2010 10:19:50 Gaetan de Menten escrigué:
>>>> I guess you are pretty busy, but I would really appreciate your
>>>> opinion about those two tickets (it's been 3 months without reply).
>>>> I'm willing to make (other) patches, tests or whatever you want to
>>>> get those changes included. Especially 287 is a burden for me since
>>>> I have to distribute my patch along with my program and explain to
>>>> my users how to patch their copy of PyTables... So I would like for
>>>> it to be either included in some form, or rejected altogether so
>>>> that I would work around it.
>>> Yeah, too many things to do lately... Anyway, I plan to release
>>> 2.2.1 next week (let's see). I've had a quick look into #287 and
>>> seems good to me, so I plan to add it to the forthcoming release.
>>> Which is the other you are referring to?
>> Er... you are referring to #286 indeed. I'll try to think about this
>> (of course, a patch would help me think faster :-)
> Thanks for the quick reply. I'll produce a patch for #286... in time.
> That one is more a nitpick than anything, so I'll come back to it in a
> few weeks now that I know you are possibly interested...
I am just about to ask for the similar feature. Without this feature, I
have to recreate the Expr object every time I try to change the start
and end position, which is very annoying, although it will not affect
the performance a lot. And the eval() can only be called once, other
wise it is going to give wrong result.
I try to create an expr object with certain expression, then I am going
to change the input range in a loop, and repeatedly call expr.eval().
I found out this is impossible, only the first time calling expr.eval()
will work, outputing (10,5) array. Then it always ouputs the same (5,)
array, unless I recreate expr again. Is this an expected behavior?
By the way, is there any way to set the input range for several
different dimensions? For example, if I get (4e12,100) array: A, and I
probably want to evaluate expression only on A[x:y,2:5]. I think
this will be very useful feature for large arrays.
import numpy as npy
import tables as pytbs
h5file = pytbs.openFile(h5filename, mode = "w")
ca = h5file.createCArray(\
for i in range(0,10):
expr = pytbs.Expr("10*srcArray")
for i in range(0,5):
print 'start,stop:',expr.start, expr.stop