     specifies whether *end_point* is at the upper (True) or lower (false)
     end of the axis.
     """
-    quotient, remainder = divmod( end_point, tick_interval )
-    if ((remainder == 0.0) or
-        (((tick_interval - remainder) / tick_interval) < 0.00001)):
+    [quotient, remainder] = divmod( end_point, tick_interval )
+    rem_p = remainder == 0.0
+    tick_p = ((tick_interval - remainder) / tick_interval) < 0.00001
+    if rem_p or tick_p
         return end_point
 
     c1 = (quotient + 1.0) * tick_interval
     c2 = quotient         * tick_interval
-    if is_upper:
+    if is_upper
         return max( c1, c2 )
     return min( c1, c2 )
+

    if range == 0.0
        range = 1.0
    interval  = range / intervals
    factor    = 10.0 ** Math.floor( log10( interval ) )
    interval = interval / factor

    if interval < 2.0

    # so we subtract a small, index dependent amount from each difference
    # to force correct ordering.
    sh    = shape( differences )
    #small = 2.2e-16 * arange( sh[1] ) * arange( sh[0] )[:,newaxis]
    #small = small[::-1,::-1] #reverse the order
    differences = differences - small

    # ? Numeric should allow keyword "axis" ? comment out for now
