[Numpy-discussion] Numpy and OpenMP

Christopher Barker Chris.Barker@noaa....
Mon Mar 17 12:06:11 CDT 2008

>  > Plus a certain amount of numpy code depends on order of
>  > evaluation:
>  >
>  > a[:-1] = 2*a[1:]

I'm confused here. My understanding of how it now works is that the 
above translates to:

1) create a new array (call it temp1) from a[1:], which shares a's data 
2) create a temp2 array by multiplying 2 times each of the elements in 
temp1, and writing them into a new array, with a new data block
3) copy that temporary array into a[:-1]

Why couldn't step (2) be parallelized? Why isn't it already with, BLAS? 
Doesn't BLAS must have such simple routines?

Also, maybe numexpr could benefit from this?


Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception


More information about the Numpy-discussion mailing list