Multiple Pieces in a numpy.piecewise
I am taking a course on Fuzzy Systems and I take my notes on my computer. This means that I have to draw graphs on my computer from time to time. Since these graphs are quite well defined, I feel that plotting them with numpy would be a good idea (I take notes with LaTeX, and I'm pretty quick on the python shell, so I figure I can get away with this). The graphs for fuzzy membership functions are highly piecewise, for example: In order to plot this, I tried the following code for a numpy.piecewise (which gives me a cryptic error): In [295]: a = np.arange(0,5,1) In [296]: condlist = [[b<=a<b+0