Python Forum
variable call back into an array
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
variable call back into an array
#3
What I need is to know how to put a condition for the value of Areas
so if there is an Area at port 0 the value will be 0.1
if there is an Area at port 1 the value will be 0.2

I need this to be here
 def Values1(self):
      equation = Equation(1, uCounter)          #where Equation is an array class 
      for p in range(self.nPorts):              #nPorts is the number of ports with an area 
         equation.A[0, self.m.gid[p]] = self.Areas[p] #the multible values of the Area will be put into an array equation.A
      equation.c[0] = 0.0                       #This is a vector 
      return(equation)
in the self.Areas[p]

if I can do this my problem will be resolved.
Reply


Messages In This Thread
variable call back into an array - by yamifm0f - Jun-06-2019, 01:23 PM
RE: variable call back into an array - by heiner55 - Jun-07-2019, 05:11 AM
RE: variable call back into an array - by yamifm0f - Jun-07-2019, 02:36 PM
RE: variable call back into an array - by heiner55 - Jun-07-2019, 02:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Struggling for the past hour to define function and call it back godlyredwall 2 2,282 Oct-29-2020, 02:45 PM
Last Post: deanhystad
  Simple automated SoapAPI Call with single variable replacement from csv asaxty 1 2,149 Jun-30-2020, 06:38 PM
Last Post: asaxty
  np array tolist and back anthares 2 2,035 Jun-13-2020, 06:58 AM
Last Post: anthares
  Call a variable jmf08 16 6,052 Jan-18-2019, 05:50 AM
Last Post: jmf08
  call a variable from one function to another ... evilcode1 4 4,056 Sep-16-2018, 10:50 AM
Last Post: gruntfutuk
  Spyder hides middle array values in variable explorer window davidqvist 0 2,427 Aug-03-2018, 11:04 AM
Last Post: davidqvist
  How to call a variable declared in a function in another python script lravikumarvsp 2 2,996 Jun-04-2018, 08:45 AM
Last Post: Larz60+
  2D Array/List OR using variables in other variable names? IAMK 4 3,948 Apr-16-2018, 09:09 PM
Last Post: IAMK

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020