From: Ralf Mueller Date: 2009-09-04T20:07:08+09:00 Subject: Re: Array.transpose on [[]] or [[],[]] Sebastian Hungerecker wrote: > Am Freitag 04 September 2009 11:25:04 schrieb Ralf Mueller: > >> sure, but [[]] has a subarray. so, shouldn't [[]].transpose have one too? >> > > Well, [[1],[2]] has two subarrays so should [[1],[2]].transpose have two > subarrays too? > As I said, the number of subarrays in the result equals the number of items > per subarray in the source. I find this completely consistent. > > >> To point it out in a more general way: I thought, if 'transpose' can be >> applied to an array, it should behave like an involution: >> a.transpose.transpose = a. >> > > If both [[]].transpose and [[],[]].transpose would return [[]], that still > wouldn't be true (because then [[],[]].transpose.transpose would be [[]]). > Yes, I was contradictory to myself ;( And a.transpose.transpose = a is true for 'non-degenerated' a. Have to program a bit more careful (not too much guessing). thanks again ralf