-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
I could be wrong here, but I sort of think that mpinv() should function about the same as minv() --- but broadcasting fails for mpinv():
minv() broadcasts the inverse:
pdl> $p = sequence(2,2,5)
pdl> p $p->minv
[
[
[-1.5 0.5]
[ 1 0]
]
[
[ -3.5 2.5]
[ 3 -2]
]
[
[ -5.5 4.5]
[ 5 -4]
]
...
]
whereas mpinv() blows up when trying the pseudo-inverse:
pdl> p $p->mpinv
PDL: PDL::Ops::gt(a,b,c): Parameter 'b':
Mismatched implicit broadcast dimension 0: size 2 vs. 5
There are 3 PDLs in the expression; 2 broadcast dims.
PDL IN EXPR. BROADCAST DIMS
# 0 (normal): 2 5
# 1 (normal): 5
# 2 (null)
.. at ops.pd line 136.
PDL::Ops::__ANON__(PDL=SCALAR(0x564b231f17a0), PDL=SCALAR(0x564b23290390), "") called at /usr/local/lib64/perl5/PDL/LinearAlgebra.pm line 926
PDL::mpinv(PDL=SCALAR(0x564b232406c8)) called at (eval 65) line 4
main::__ANON__() called at /usr/local/bin/perldl line 682
eval {...} called at /usr/local/bin/perldl line 682
main::eval_and_report("p \$p->mpinv\x{a}") called at /usr/local/bin/perldl line 618
main::process_input() called at /usr/local/bin/perldl line 638
eval {...} called at /usr/local/bin/perldl line 638
Metadata
Metadata
Assignees
Labels
No labels