471,089 Members | 1,768 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,089 software developers and data experts.

need help with array

I need to pull a number from an array so that I can added to another number

Sample code

ierr, interchange = psspy.aareareal(-1, 1, 'PINT')
print interchange

this returns a value of
[[-1920.4107666015625, -2015.23876953125, -79.487495422363281]]

The number I'm intrested on is the -79.487495422363281

The next line of code would be

newinterchange = interchange + 220

Thanks in advance for all your help,
Mar 31 '08 #1
1 1179
314 100+
you could do interchange[-1] += 220, which takes the last element of the interchange array (at index -1) and adds 220 to it... give that a shot.
Mar 31 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Nathan Rose | last post: by
4 posts views Thread by KellyH | last post: by
48 posts views Thread by Chad Z. Hower aka Kudzu | last post: by
2 posts views Thread by Thomas Connolly | last post: by
23 posts views Thread by vinod.bhavnani | last post: by
5 posts views Thread by SpreadTooThin | last post: by
20 posts views Thread by Martin Jørgensen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.