[Matrix-SIG] rotater?

Yoon, Hoon (CICG - NY Program Trading) HYoon@exchange.ml.com
Wed, 16 Jun 1999 16:47:48 -0400


Tim,

  Thanks much for your answer. It partially answer my Q. Unfortunately, this
still means I need to loop over axis as you have said. Probably C extension
time.
  Just few things that one expects when converting from one lang to another.
Most stuff are easy, but few things are still easier on the old lang.

**************************************************************
S. Hoon Yoon                   (Quant)                    Merrill Lynch
Equity Trading 
yelled@yahoo.com hoon@bigfoot.com(w)
"Miracle is always only few standard deviations away, but so is
catastrophe."
* Expressed opinions are often my own, but NOT my employer's.
"I feel like a fugitive from the law of averages."    Mauldin
**************************************************************

> -----Original Message-----
> From:	Tim Hochberg 
> Sent:	Wednesday, June 16, 1999 3:31 PM
> To:	Yoon, Hoon (CICG - NY Program Trading)
> Cc:	matrix-sig@python.org
> Subject:	Re: [Matrix-SIG] rotater?
> 
> Yoon, Hoon (CICG - NY Program Trading) wrote:
> 
> >  Gauss has this thing called rotater, which given array rotates it by
> >another value in array
> >
> >x = [[1,2,3], [2,3,4]]
> >shft = [1,2]
> >rotater(x, shft)
> >will give you
> >[[2,3,1], [4,2,3]]
> >   Easy enough to do in a loop, but can I avoid this somehow?
> 
> 
> It pretty easy to avoid the inner loop due to shifting all of the
> elements,
> you still may have to loop over the other axes, but perhaps this will get
> you started:
> 
> -tim
>  << File: rotater.py >>