This line
$x = pdl($x,$tmpx)->flat;
when I run your script $x has 1000 elements and $tmpx has 10. I am
not sure pdl() has
a defined behaviour in this case. The docs don't even mention the two
piddle args case.
Perhaps what you want is -
$x = append($x, $tmpx);
Karl
On Jul 17, 2006, at 5:21 PM, David Whysong wrote:
Hi all,
I'm having a problem with part of a script that does monte-carlo
statistics. I'm trying to generate a sample of randomly oriented unit
vectors (in 3D space) which has a total number $npoints which is
evenly divisible by $n after excluding some of the sample, based on
orientation.
(For those astronomers on the list: I'm trying to model radio galaxies
in the unified model, excluding quasars, using a 40 degree opening
angle for the obscuring torus.)
I'm seeing errors of this sort:
*** glibc detected *** /usr/bin/perl: free(): invalid pointer:
0x09124568 ***
(or, sometimes)
*** glibc detected *** malloc(): memory corruption: 0x094da180 ***
A simplified version of my script which demonstrates the problem is
attached. I'm not sure if I'm doing something stupid of if this is a
bug in PDL.
Any suggestions as to how I can make this work would be greatly
appreciated.
--
David Whysong
<test.pl>
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl