From 7bf2aa4054b8378a76dff63acdccbcdad91f68e6 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 7 Aug 2021 20:41:31 -0400 Subject: BREAKING: Don't allow First of empty or reshaping empty to non-empty --- doc/reshape.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/reshape.md') diff --git a/doc/reshape.md b/doc/reshape.md index 902beadc..4be0c608 100644 --- a/doc/reshape.md +++ b/doc/reshape.md @@ -88,11 +88,11 @@ If the left argument implies a smaller number of elements, then only the initial 3‿3 ⥊ a -If the left argument implies a larger number of elements, then the argument elements are reused cyclically. Below, we reach the last element `247` and start over at `135`. If the array doesn't have any elements to start with, its [fill element](fill.md) is used instead, but it's probably best not to invoke this case! +If the left argument implies a larger number of elements, then the argument elements are reused cyclically. Below, we reach the last element `247` and start over at `135`. If the array doesn't have any elements to start with, you'll get an error as there aren't any elements available. 15 ⥊ a - 4 ⥊ ↕0 # Fill for ↕0 is 0 + 4 ⥊ ↕0 Reshape is the idiomatic way to make an array filled with a constant value (that is, where all elements are the same). For an atom element, just reshape it directly; for an arbitrary element, first enclose it to create a unit, and then reshape it. -- cgit v1.2.3