By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,621 Members | 1,101 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,621 IT Pros & Developers. It's quick & easy.

need help with array

P: 13
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
Share this Question
Share on Google+
1 Reply

P: 314
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.