$ pdl
perldl> print pdl(zeroes(100),zeroes(10));
I get a similar error:
*** glibc detected *** malloc(): memory corruption: 0x08632b98 ***
Aborted
This is with the CVS version.
Bill
On 7/17/06, David Whysong <[EMAIL PROTECTED]> wrote:
Thanks, that does the trick. Originally I had the same dimension in
the $x and $tmpx PDLs so this problem was hidden until I tried to make
it more efficient...
It would be nice if PDL would produce a suitable error message in this
case, instead of dying gracelessly.
--
David Whysong
On 7/17/06, Karl Glazebrook <[EMAIL PROTECTED]> wrote:
> 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
--
Bill Coffman
~~~_\\\|/
~~~-(@ @)
=oOO=(_)==OOo===
_______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
