Python Forum
Python : NameError: name 'total_wait' is not defined
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python : NameError: name 'total_wait' is not defined
#2
Quote:plt.plot(total_wait)
total_plot doesnt exist, but there is a class attribute for Simulation
s is your Simulation object in which has an attribute total_wait. Within a class definition you use self.total_wait, outside of the class you need to refer to it using the object, in this case 's'
Quote:s = Simulation()
try this....
plt.plot(s.total_wait)
Recommended Tutorials:
Reply


Messages In This Thread
RE: Python : NameError: name 'total_wait' is not defined - by metulburr - Jun-04-2017, 05:41 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  NameError: name 'predicted_labels' is not defined hobbyist 2 873 Dec-08-2023, 02:18 PM
Last Post: hobbyist
  NameError: name 'rand' is not defined Truman 7 6,905 Jun-17-2020, 07:14 PM
Last Post: Truman
  NameError mlab not defined PythonAndArduino 5 7,083 Nov-08-2017, 06:47 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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