On Sun, Jun 30, 2024 at 10:04 AM Cottrell, Allin <cottrell(a)wfu.edu> wrote:
On Fri, Jun 28, 2024 at 10:19 PM Sven Schreiber
<sven.schreiber(a)fu-berlin.de> wrote:
>
> Hi, in the context of a problem in the SVAR addon I've stumbled over
> what might be a bug in msplitby:
>
> Consider this:
>
> <hansl>
> matrix M = {1,2}
> matrices MM = msplitby(M, {2}) # gives invalid argument error
> print MM
> </hansl>
It seems to me the second argument is indeed erroneous here.
The doc says that if the second arg is a vector, it "must be of length
equal to the relevant (row or column) dimension of X, and should
contain integer values with a minimum of 1 and [...]
Ah, on reading the latter part of Sven's posting it seems I was
misinterpreting the "minimum value of 1" condition. I'd say the doc
leaves this ambiguous, but in practice it appears to mean that the
vector must not contain a value less than 1, rather than (as I
assumed) must contain 1 as its least value.
Given that, Sven's first example ought to work, and that's now the case in git.
Allin