summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--array.c2
-rw-r--r--operators.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/array.c b/array.c
index a4bde78..e333870 100644
--- a/array.c
+++ b/array.c
@@ -217,7 +217,7 @@ simplifyarray(Array *a)
return fnSame(a); /* cannot be simplified */
}
- if(sametype){
+ if(sametype && type != AtypeArray){
Array *b = duparrayshape(a, type);
for(i = 0; i < a->size; i++){
if(nested){
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 *