summaryrefslogtreecommitdiff
path: root/operators.c
diff options
context:
space:
mode:
authorPeter Mikkelsen <petermikkelsen10@gmail.com>2022-01-26 13:51:28 +0000
committerPeter Mikkelsen <petermikkelsen10@gmail.com>2022-01-26 13:51:28 +0000
commit024867f3da16c7b51a768399401de1edcd417384 (patch)
tree45b8a7f7820f7870d6ad2212cfa74cf3211a27e3 /operators.c
parent7f66d444451dab0e831cc0f14cc77ad691936f42 (diff)
Add a better implementation of inner product, and don't simplify nested arrays if the contents are also arrays
Diffstat (limited to 'operators.c')
-rw-r--r--operators.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/operators.c b/operators.c
index 2280e13..8fd9911 100644
--- a/operators.c
+++ b/operators.c
@@ -173,9 +173,9 @@ opInnerProduct(Datum *lefto, Datum *righto, Array *left, Array *right)
throwerror(nil, EType);
if(left->rank > 0 && right->rank > 0 && left->shape[left->rank-1] != right->shape[0])
- throwerror(L"Last dimension of A must match first dimension of B in A f.g B", EShape);
+ throwerror(nil, ELength);
- return rundfn(L"⍶/¨(↓⍺)⍹⌾⍉↓⍉⍵", lefto, righto, left, right);
+ return rundfn(L"↑(↓⍺)(⍶/⍹¨)⌾⍉↓⍉⍵", lefto, righto, left, right);
}
Array *