Re: [Pdl-devel] PDL 2.075 released

2022-02-25 Thread David Mertens
My mistake, the issue in the tests was not about boolean context, it was that I was collecting the result of max() in a shared Perl array for testing after the threads had run. Pushing a Perl scalar onto a shared array is not a problem but pushing a PDL is disallowed. I solved it by calling ->sclr(

Re: [Pdl-devel] PDL 2.075 released

2022-02-25 Thread Ed .
Hi Ingo, The specific case of a single-element ndarray which has a badvalue returning true in a Boolean context is clearly a bug, and will be fixed (https://github.com/PDLPorters/pdl/issues/388). But unfortunately reverting the whole change would now (half a year after) involve breaking other c

Re: [Pdl-devel] PDL 2.075 released

2022-02-25 Thread Ingo Schmid
Hi Ed, I do not mind the behaviour as such but rather the fact that it changed. That breaks previous code in non-obvious ways. There are so many functions which either take a piddle or perl scalar/list as input - or not. The empty piddle case, for example, changed the result from undef to BAD, whi