@@ -821,19 +821,6 @@ def tick_values(self, vmin, vmax):
821
821
822
822
self .rule .set (dtstart = start , until = stop )
823
823
824
- # estimate the number of ticks very approximately so we don't
825
- # have to do a very expensive (and potentially near infinite)
826
- # 'between' calculation, only to find out it will fail.
827
- nmax , nmin = date2num ((vmax , vmin ))
828
- estimate = (nmax - nmin ) / (self ._get_unit () * self ._get_interval ())
829
- # This estimate is only an estimate, so be really conservative
830
- # about bailing...
831
- if estimate > self .MAXTICKS * 2 :
832
- raise RuntimeError (
833
- 'RRuleLocator estimated to generate %d ticks from %s to %s: '
834
- 'exceeds Locator.MAXTICKS * 2 (%d) ' % (estimate , vmin , vmax ,
835
- self .MAXTICKS * 2 ))
836
-
837
824
dates = self .rule .between (vmin , vmax , True )
838
825
if len (dates ) == 0 :
839
826
return date2num ([vmin , vmax ])
@@ -1254,6 +1241,8 @@ def __init__(self, bymonthday=None, interval=1, tz=None):
1254
1241
1255
1242
Default is to tick every day of the month: ``bymonthday=range(1,32)``
1256
1243
"""
1244
+ if not interval == int (interval ) or interval < 1 :
1245
+ raise ValueError ("interval must be an integer greater than 0" )
1257
1246
if bymonthday is None :
1258
1247
bymonthday = range (1 , 32 )
1259
1248
elif isinstance (bymonthday , np .ndarray ):
0 commit comments