[SciPy-user] Transforming 1-d array to 2-d array

Rich Shepard rshepard@appl-ecosys....
Mon Feb 26 21:57:18 CST 2007


On Mon, 26 Feb 2007, Rich Shepard wrote:

>   I have three arrays; the first one is named barEco and contains:
>
> [[ 2.29075869  2.12453058  3.06339111  2.88526612  3.32199956  2.96319486
>    3.12649018  2.81580625  3.23207315  2.493608    2.49459335  2.86643834
>    2.77111816  2.26500627  2.4902972   2.81149761  2.46213192  2.80432329
>    2.86150888  3.1135404   1.96135592  3.34577184  3.27458386  2.90845738
>    2.88745987  2.51245188  2.91666234  2.97438117]]
>
>   I see that your myData array has only single brackets while my data have
> two. That seems to have resulted from manipulations where the database
> records were separated into individual lists and then averages computed

   Well, duh! I used an intermediate array, then extracted [0] from it, and
everything works. I still don't fully understand the 'idx' variable, but I'm
sure that will come with further reading, thinking about it, and playing
with the python shell.

   The final step is to take the inverse of each of the values in the upper
half and put it in the mirror position of the lower half. More reading
required to figure that one out.

Thanks again,

Rich

-- 
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.        |          Accelerator(TM)
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863


More information about the SciPy-user mailing list