Further to this, I looked through the rcols() diff. I could find no significant 
change in the code that smelled like it could cause this.

Here is a visual diff: https://www.diffchecker.com/w2FX8O61/ 
<https://www.diffchecker.com/w2FX8O61/>. (v2.025, v2.084)

I am afraid it must be a subtle bug to do with the internal routines that rcols 
uses (buffering and extending of ndarrays?)  and perhaps the underlying 
dataflow engine. 

Arghh!

Probably worth tracking down as it might be causing other badness….

Karl

> On 7 Jan 2024, at 11:26 am, Karl Glazebrook via pdl-general 
> <pdl-general@lists.sourceforge.net> wrote:
> 
> Hi all,
> 
> This dinosaur just upgraded from PDL v2.025 to v.2.084 (yes, I know that is 
> lame)
> 
> I noticed a few things when running one of my complicated codes, I will start 
> seperate email threads
> 
> First there seems to be a serious rcols bug:
> 
> 
> e.g. create a file
> 
> # tmp.dat
> 1
> 2
> 3
> 4
> 
> 
> Loaded PDL v2.084 (supports bad values)
> pdl> $x = rcols 'tmp.dat'                                                     
>                                                              
> Reading data into ndarrays of type: [ Double ]
> Read in  4  elements.
> 
> pdl> p $x                                                                     
>                                                              
> [1 2 3 4]
> pdl> $x *= 100                                                                
>                                                              
> 
> pdl> p $x                                                                     
>                                                              
> [100 200 300 400]
> pdl> p median($x)                                                             
>                                                              
> 0
> pdl> p $x                                                                     
>                                                              
> [100 200 300 400]
> 
> 
> It seems the median function sees the values BEFORE the inplace 
> multiplacation, whereas print does not. This is very bad. min() and max() are 
> similar. No idea what is going on here! The behaviour or absent from v2.025
> 
> Notes
> - making a $x->copy() removes the effect
> - creating $x using sequence also removes, so it is something to do with 
> rcols() and not inplace in general?
> 
> I’d be interested to know if others can reproduce this. It definitely needs a 
> fix
> 
> best
> 
> Karl
> 
> 
> 
> _______________________________________________
> pdl-general mailing list
> pdl-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pdl-general

_______________________________________________
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general

Reply via email to