def make_step_rcont (transition):
    """Return a ufunc-like step function that is right-continuous. Returns 1 if
    x >= transition, 0 otherwise.

    """
    if not np.isfinite (transition):
        raise ValueError ('"transition" argument must be finite number; got %r' % transition)

    def step_rcont (x):
        x = np.asarray (x)
        x1 = np.atleast_1d (x)
        r = (x1 >= transition).astype (x.dtype)
        if x.ndim == 0:
            return np.asscalar (r)
        return r

    step_rcont.__doc__ = ('Right-continuous step function. Returns 1 if x >= '
                          '%g, 0 otherwise.') % (transition,)
    return step_rcont
def make_step_rcont ( transition ) : if not np . isfinite ( transition ) : raise ValueError ( '"transition" argument must be finite number; got %r' % transition ) def step_rcont ( x ) : x = np . asarray ( x ) x1 = np . atleast_1d ( x ) r = ( x1 >= transition ) . astype ( x . dtype ) if x . ndim == 0 : return np . asscalar ( r ) return r step_rcont . __doc__ = ( 'Right-continuous step function. Returns 1 if x >= ' '%g, 0 otherwise.' ) % ( transition , ) return step_rcont
Return a ufunc-like step function that is right-continuous. Returns 1 if
    x >= transition, 0 otherwise.