I'm iterating over a NumPy (nd) array of OpenCV lines. I want to remove all lines which are outwith 8 degrees of vertical. I realise the numpy array is immutable and what I'm doing in the code is not right but it demonstrates the idea of what I'm trying to do;
index = 0
for line in self.lines[0]:
if (line[1]*180)/np.pi > 8:
self.lines[0] = np.delete(self.lines[0], index, axis=0)
index+=1
How can I go about removing these NumPy array indexes?
Thanks!
if (line[1]*180)/np.pi > 8does, or what are you trying to achieve with it?