Re: [Pdl-general] [Pdl-devel] inconsistent determinant

2023-02-10 Thread Ed .
Hi Luis, The key (if you’ll forgive the pun) is the behaviour of the “det” function, which is (at this writing) defined in Basic/MatrixOps/matrixops.pd as: sub det { my($x) = shift; my($opt) = shift; $opt = {} unless defined($opt); my($lu,$perm,$par); if(exists ($opt->{lu}) and (ref $o

[Pdl-general] inconsistent determinant

2023-02-10 Thread Luis Mochan
I found a curious situation when running pdl, as illustrated in the following example. I build two singular 3x3 matrices and calculate their determinant, which is zero. However, in one case I get a PDL scalar and in the other I get a Perl scalar. I don't know why the different behaviour: # Progra