python, plot triangular function into 2d arrays
<p>I'm new to python, in this case, I want to put my function into 2d arrays, so I can plot the function. Here is my triangle function, I'm using it for fuzzy logic:</p>

<pre><code>def triangle (z,a,b,c):
    if (z&lt;=a) | (z&gt;=c):
        y = 0
    elif (a&lt;=z) &amp; (z&lt;=b):
        y = (z-a) / (b-a)
    elif (b&lt;=z) &amp; (z&lt;=c):
        y = (b-z) / (c-b)
    return y
</code></pre>

<p>and I'm trying to make the array using numpy, 
<code>np.linspace</code> but I can't get it done,
I've tried to use the fuzzy library, but nothing works.</p>