From eef9cebe3a2e8faadb5e7eaf0c9c40e70a3522b0 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Wed, 2 Sep 2020 17:31:47 -0400 Subject: =?UTF-8?q?Add=20computed=20axis=20to=20Reshape:=20=E2=88=98exact,?= =?UTF-8?q?=20=E2=8C=8Atruncate,=20=E2=8C=BDwrap,=20=E2=86=91fill?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/r.bqn | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/r.bqn b/src/r.bqn index 674d4e61..b80bfad2 100644 --- a/src/r.bqn +++ b/src/r.bqn @@ -207,14 +207,25 @@ identity ← (0⊑⟨"Identity not found"!0˜⟩) {(0⊑𝕨){𝕗=𝕩}◶𝕩 Deshape←IsArray◶{⟨𝕩⟩}‿⥊ Reshape←{ "Shape argument to Reshape must have rank at most 1" ! 1≥=𝕨 - 𝕨↩Deshape 𝕨 - "Shape in Reshape must consist of natural numbers" ! ∧´Nat⌜𝕨 - l←×´𝕨 - n←×´≢𝕩 - 𝕨⥊{ - 𝕩(0