Revision: 4905
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4905&view=rev
Author:   mdboom
Date:     2008-01-29 12:18:21 -0800 (Tue, 29 Jan 2008)

Log Message:
-----------
Add safety check.

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/path.py

Modified: trunk/matplotlib/lib/matplotlib/path.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/path.py     2008-01-28 18:02:31 UTC (rev 
4904)
+++ trunk/matplotlib/lib/matplotlib/path.py     2008-01-29 20:18:21 UTC (rev 
4905)
@@ -456,6 +456,8 @@
         # number of curve segments to make
         if n is None:
             n = int(2 ** npy.ceil((eta2 - eta1) / halfpi))
+        if n < 1:
+            raise ValueError("n must be >= 1 or None")
 
         deta = (eta2 - eta1) / n
         t = npy.tan(0.5 * deta)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to