Francesc Alted:
> A Friday 22 October 2010 20:54:21 braingateway escrigué:
>   
>> Gaetan de Menten :
>>     
>>> On Fri, Oct 22, 2010 at 10:53, Francesc Alted <fal...@pytables.org> 
>>>       
> wrote:
>   
>>>> A Friday 22 October 2010 10:45:13 Francesc Alted escrigué:
>>>>         
>>>>> A Friday 22 October 2010 10:19:50 Gaetan de Menten escrigué:
>>>>>           
>>>>>> Hello,
>>>>>>
>>>>>> 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...
>>>       
>> Hi Gaëtan,
>>
>> 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.
>>     
>
> Now that I think, I ended implementing this behaviour because I needed a 
> way to pass a lot of parameters to the computational kernel.  For 
> passing such parameters, I implemented the next methods for `Expr`:
>
> * setInputsRange(start=None, stop=None, step=None)
> * setOutput(out, append_mode=False)
> * setOutputRange(start=None, stop=None, step=None)
>
> Do you think that it is better to be able to pass these params to 
> `eval()` instead?  Hmm, I'm not that sure...
>
>   
>> 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?
>>     
>
> Recreating the expression (via `Expr` constructor) is very cheap in 
> terms of time.  Why do you not like doing this?
>
>   
I know it does not affect the performance:-) It is just  make the  
programming style more consitent;-p I should say I am already quite 
happy about the Expr behavior now. But you know, users are always greedy :-D
>> 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.
>>     
>
> It should be pretty useful indeed.  But, for doing this I'm afraid that 
> we'd need to implement something similar to NumPy views, but for 
> PyTables containers (this is how numexpr deals with the problem at 
> least).  Unfortunately I don't think this is going to happen anytime 
> soon, so you will need to explicitly *copy* the interesting chunks of 
> the array prior to perform computations.
>   
OK, I think I have to live with that then:-/ Anyway, I did not noticed 
much performance-worsening with an explicity *copy*.

Thanks a lot,

LittleBigBrain

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to