Good Day,
So I have an object called PointArray and another object called Graph. I am passing the object point to Graph as such
class Graph:
def __init__(self):
self.pointArray = PointArray()
description = "This is a class"
author = "Raaj"
def setPointArray(self,pointArray):
self.pointArray=pointArray
def plotFFTGraph(self):
xArr=[]
yArr=[]
for point in self.pointArray.freqArray
xArr.append(point.X)
yArr.append(point.Y)
subplot(2,1,2)
plot(xArr,yArr)
The problem is, Python doesn't seem to recognize that I can access freqArray!
I get this
for point in self.pointArray.freqArray
^
SyntaxError: invalid syntax
I have imported everything correctly. What gives this error?
AttributeError: 'Spam' object has no attribute 'freqArray'. But it's sayingSyntaxError: invalid syntax—that means there's something wrong with your punctuation.