Hi Kare!

something like:
perldl> p $x
[0 1 2 3 4 5 6 7 8 9 10 11 12 13]
perldl> p transpose($x->reshape(7,2))

[
 [ 0  7]
 [ 1  8]
 [ 2  9]
 [ 3 10]
 [ 4 11]
 [ 5 12]
 [ 6 13]
]

should do it!

cheers,
Bruno

Kåre Edvardsen a écrit :
Works great and very quick!

You would not happen to know how to get something like this

[ 0  1  2  3  4  5  6  7  8  9 10 11 12 13]

into this

0  7
1  8
2  9
3  10
4  11
5  12
6  13



Cheers,
Kare

On Fri, 2008-09-19 at 09:58 +0000, Xavier Calbet wrote:
  Use average and possibly xchg(0,1) to exchange dimensions.

  $p->average

will project everything onto the second dimension averaging over the
first dimension

  $p->xchg(0,1)->average

will do the same thing but averaging over the second dimension

  Cheers,

  Xavier

On Fri, Sep 19, 2008 at 9:05 AM, Kåre Edvardsen <[EMAIL PROTECTED]> wrote:
> I've got a piddle of 24 x 16500 from which I need the mean value row-wise.
> What would be the fastes way of doing that?
>
> Cheers,
> Kare
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>
>

    


Cliquez ici si ce message est indésirable (pourriel).


_______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

--
____________________________________________________
Dr. Bruno Picard

CLS
Dir. Océanographie Spatiale, Dép. Traitement de la Mesure et Segment Sol
Space Oceanography Division, Data Analysis and Ground Processing Unit

8-10 rue Hermès, 31520 Ramonville Saint Agne, France
Tél: (+33)5.61.39.37.37 Fax: (+33)5.61.39.37.82
[EMAIL PROTECTED] http://www.cls.fr
http://www.jason.oceanobs.com (aviso site)
http://www.ipcc.ch
____________________________________________________

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to