Karim Belabas on Tue, 08 Jul 2014 08:44:10 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: concat([]) |
* Max Alekseyev [2014-07-08 00:34]: > ? concat([]) > *** at top-level: concat([]) > *** ^---------- > *** concat: domain error in concat: vector = [] > *** Break loop: type 'break' to go back to GP prompt > > > Should it simply return [] ? No, see ??concat [...] If y is omitted, x has to be a row vector or a list, in which case its elements are concatenated, from left to right, using the above rules. [...] concat([x_1,...,x_n] /* single vector */) is *defined* as the following concatenation of all elements in the set: concat(concat((concat(x_1,x_2), x_3) ..., x_n) You're trying to concatenate the elements of the empty set. This is undefined just like e.g. vecmax would be. Cheers, K.B. -- Karim Belabas, IMB (UMR 5251) Tel: (+33) (0)5 40 00 26 17 Universite Bordeaux 1 Fax: (+33) (0)5 40 00 69 50 351, cours de la Liberation http://www.math.u-bordeaux1.fr/~kbelabas/ F-33405 Talence (France) http://pari.math.u-bordeaux1.fr/ [PARI/GP] `