Hmm... Although I don't recall any changes that would affect this
between 2.4.3 and now, it's worth trying. Would you be so kind as to
pull down and install the latest CVS? (instructions for anonymous
download are on the PDL website), and/or attach a copy of your $b (you
can use "sdump" to make a mailable copy)? That way we can isolate
whether it is something peculiar about your computer, the 2.4.3
install, or your data.
Best,
Craig
On Sep 14, 2008, at 9:12 PM, Steve Cicala wrote:
Yeah, same with parentheses, and $b are just integers:
So the strange thing is that when I take a slice of say, the first
100 elements of $b, it works fine--a slice of 500 gives the error.
Odd, no?
perldl> $c=($a==$b->dummy)
multielement piddle in conditional expression
perldl> $slice=slice $b, '0:100'
perldl> $c=($a==$slice->dummy)
perldl> p dims $c
480000 101
perldl> $slice=slice $b, '0:500'
perldl> $c=($a==$slice->dummy)
multielement piddle in conditional expression
On Sun, Sep 14, 2008 at 4:00 PM, Craig DeForest <[EMAIL PROTECTED]
> wrote:
Does $b contain something special? I'm using
floor(random(500)*48000), but maybe you've got a less generic set of
values in there...
On Sep 14, 2008, at 8:53 PM, Steve Cicala wrote:
Thanks for the DiskCache pointer.
The exact expression that gives me the error (even after invoking
$PDL::BIGPDL=1) is
$c=$a==$b->dummy
where
$b is Double D [500]
$a is Double D [480000]
On Sun, Sep 14, 2008 at 3:41 PM, Craig DeForest <[EMAIL PROTECTED]
> wrote:
Steve,
Are you sure you sent us the exact expression you used below? For
example, if you masked
your very large data set with something like:
$c = maximum( ($a==$b->dummy)->xchg(0,1)) != 0 && (xvals($b-
>dim(0))<5000))
to look at only the first 5000 rows, then the "&&" would throw the
'multielement' error, because && is a short-circuiting operation.
In general, you have to be in a branching logical construct to
throw that error, because there's no way to evaluate the argument
of the branch in anything but Perl's boolean context. The
branching logical constructs are the tests of the 'if', 'unless',
'elsif', 'for(;;)', 'while', and 'until' statements, and the '?:',
'&&', and '||' operators. The reason your error message is
puzzling is that your example doesn't contain any of those, so if
you are using that exact expression it indicates something
extremely peculiar going on in the guts of PDL.
On Sep 14, 2008, at 8:11 PM, Steve Cicala wrote:
(I am using this to collect indicies in a that correspond with
elements in
b:
$d=which(maximum (($a==$b->dummy)->xchg(0,1))!=0)
).
Now, when I try to use this operation for large numbers (i.e. $a is
480000x1
and $b is 500x1) I get:
'multielement piddle in a conditional expression'
--And I get this error whether calculating $c on its own, or just
sticking
the expression that generates $c into the one that generates $d.
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl