does python find errors where there are none? : <p>while plotting functions with heaviside function I came up with this piece of code, in Idle:</p>

<pre><code>import numpy as np
import matplotlib.pyplot as plt

n_i = [-5, 5]
n = np.linspace(n_i[0], n_i[1], 1E3)

u1 [n+30&gt;=0] = 1
u2 [n-15&gt;=0] =1
u3 = u1 - u2

x = np.sin(2*np.pi*(n/15))*u3

plt.axis([-30,15,-5,5])


plt.xlabel('$n$',fontsize=20)
plt.ylabel('$x(n)$',fontsize=20)
plt.stem(n, x, "--k", linefmt='black', basefmt='black')
plt.grid()
plt.show()
</code></pre>

<p>and prior to today, it ran without errors, same with all other of my plots, I've been dealing with python for two years now and throughout classes it had the habit of finding errors where even teachers don't see them. am I missing something here? it says "u1 is not defined", but it is. I even compared with coworkers and classmates alike, haven't seen it put in any other way in the code for the plot. help!</p>
