diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-02-15 20:52:54 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-02-15 20:59:31 -0500 |
| commit | 19d4e4da6a93deb398f87bb6b42b1b1ee3c4926e (patch) | |
| tree | cba3ffb2e035aae2cc828d3289f5e586c2bd4589 /spec | |
| parent | 4fd3566067b123ba53e0923520bdc8e19fad7d83 (diff) | |
Give an empty result, not an error, whenever π¨ is longer than π© in Find
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/primitive.md | 2 | ||||
| -rw-r--r-- | spec/reference.bqn | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/primitive.md b/spec/primitive.md index 95fd9392..386b0dcf 100644 --- a/spec/primitive.md +++ b/spec/primitive.md @@ -197,7 +197,7 @@ Dyadic search functions check whether major cells of the *principal argument* (w - **Index of** (`β`) gives the smallest index of a principal argument cell that matches the cell, or `β π¨` if there is no such cell. - **Progressive Index of** (`β`) processes non-principal cells in ravel order, and gives the smallest index of a principal argument cell that matches the cell that hasn't already been included in the result. Again `β π¨` is returned for a given cell if there is no valid cell. -**Find** (`β·`) indicates positions where `π¨` appears as a contiguous subarray of a `=π¨`-cell of `π©`. It has one result element for each such subarray of `π©`, whose value is 1 if that subarray matches `π©` and 0 otherwise. +**Find** (`β·`) indicates positions where `π¨` appears as a contiguous subarray of a `=π¨`-cell of `π©`. It has one result element for each such subarray of `π©`, whose value is 1 if that subarray matches `π©` and 0 otherwise. Find cannot result in an error unless the rank of `π¨` is higher than that of `π©`. If `π¨` is longer along one axis than the corresponding trailing axis of `π©`, then the result has length 0 along that axis. Any atom argument to Find is automatically enclosed. ### Sorting diff --git a/spec/reference.bqn b/spec/reference.bqn index c3719144..adad4f13 100644 --- a/spec/reference.bqn +++ b/spec/reference.bqn @@ -414,8 +414,8 @@ MarkFirstβ{ Findβ{ rβ=π¨ ! rβ€=π© - π¨ β‘βr (β’π¨) ββr π© -} + π¨ β‘βr ((1+r-βΈββ’π©)ββ’π¨)βΈββr π© +}βToArray ReorderAxesβ{ π©β©<β(0=β‘)π© |
