Am 16.01.21 um 01:41 schrieb Allin Cottrell:
On Sat, 16 Jan 2021, Sven Schreiber wrote:
> when using cnameset (and presumably also rnameset) with input that
> doesn't match the dimensions, nothing happens. See here:
> matrix m = ones(2) # column
> cnameset(m, defarray("a","b")) # doesn't match, should give
> print m
> I wonder if an error should be thrown instead? Or else perhaps the first
> available elements of the array should be used?
Meybe, but it's operating per documentation: requiring a number of
strings equal to the number of columns and returning non-zero on error.
? matrix m = ones(2)
Generated matrix m
? eval cnameset(m, defarray("a","b"))
as it returns an error value, I don't think an error should be thrown
(which would lead to a full stop I guess - if not catched). The user is
responsible for testing the returned value in this case.