Return a ufunc-like step function that is left-continuous. Returns 1 if
    x > transition, 0 otherwise.
344443
def make_step_lcont (transition):
    
    if not np.isfinite (transition):
        raise ValueError ('"transition" argument must be finite number; got %r' % transition)

    def step_lcont (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_lcont.__doc__ = ('Left-continuous step function. Returns 1 if x > %g, '
                          '0 otherwise.') % (transition,)
    return step_lcont
1186620
private int getPreviousStep(int currentStep) {
        int prevStep = -1;

        // we find the next available step.
        for (int i = currentStep - 1; i >= STEP_LOGIN; i--) {
            if(isStepEnabled(i)) {
                prevStep = i;
                break;
            }
        }

        return prevStep;
    }
1144900
def prox_min(X, step, thresh=0):
    
    thresh_ = _step_gamma(step, thresh)
    below = X - thresh_ < 0
    X[below] = thresh_
    return X
1014130
def elliot_function( signal, derivative=False ):
    
    s = 1 # steepness
    
    abs_signal = (1 + np.abs(signal * s))
    if derivative:
        return 0.5 * s / abs_signal**2
    else:
        # Return the activation signal
        return 0.5*(signal * s) / abs_signal + 0.5
761061
function getStep ( xPct, xSteps, snap, value ) {

        if ( value === 100 ) {
            return value;
        }

        var j = getJ( value, xPct ), a, b;

        // If 'snap' is set, steps are used as fixed points on the slider.
        if ( snap ) {

            a = xPct[j-1];
            b = xPct[j];

            // Find the closest position, a or b.
            if ((value - a) > ((b-a)/2)){
                return b;
            }

            return a;
        }

        if ( !xSteps[j-1] ){
            return value;
        }

        return xPct[j-1] + closest(
                value - xPct[j-1],
                xSteps[j-1]
            );
    }
742678
def flow_transition(Diam, Nu):
    
    #Checking input validity
    ut.check_range([Diam, ">0", "Diameter"], [Nu, ">0", "Nu"])
    return np.pi * Diam * RE_TRANSITION_PIPE * Nu / 4
405976
def y1(x, context=None):
    
    return _apply_function_in_current_context(
        BigFloat,
        mpfr.mpfr_y1,
        (BigFloat._implicit_convert(x),),
        context,
    )
269951
function continuous(deinterpolate, reinterpolate) {
    var domain = unit, range = unit, interpolate$$1 = interpolateValue, clamp = false, piecewise, output, input;
    function rescale() {
        piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;
        output = input = null;
        return scale;
    }
    function scale(x) {
        return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);
    }
    scale.invert = function (y) {
        return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);
    };
    scale.domain = function (_) {
        return arguments.length ? (domain = map$3.call(_, number$1), rescale()) : domain.slice();
    };
    scale.range = function (_) {
        return arguments.length ? (range = slice$1.call(_), rescale()) : range.slice();
    };
    scale.rangeRound = function (_) {
        return range = slice$1.call(_), interpolate$$1 = interpolateRound, rescale();
    };
    scale.clamp = function (_) {
        return arguments.length ? (clamp = !!_, rescale()) : clamp;
    };
    scale.interpolate = function (_) {
        return arguments.length ? (interpolate$$1 = _, rescale()) : interpolate$$1;
    };
    return rescale();
}
781166
def SpiceUDSTEP(f):
    

    @functools.wraps(f)
    def wrapping_udstep(x, value):
        result = f(x)
        value[0] = c_double(result)

    return UDSTEP(wrapping_udstep)
612439
def prox_unity(X, step, axis=0):
    
    return X / np.sum(X, axis=axis, keepdims=True)
563302
def starting_step(x, step_width)
      if (x % step_width) == 0
        x
      else
        x - (x % step_width) + step_width
      end
    end
381474
def incrementor(start=0, step=1):
  
  def fxn(_):
    """Returns the next value in the sequnce defined by [start::step)"""
    nonlocal start
    rval = start
    start += step
    return rval
  return fxn
90305
def _euler_step(self, dt):
        
        self.state = self.state + self.ddt() * dt
709596
def coth(x, context=None):
    
    return _apply_function_in_current_context(
        BigFloat,
        mpfr.mpfr_coth,
        (BigFloat._implicit_convert(x),),
        context,
    )
281249
def _transition_steps(self, brightness=None):
        
        if brightness is not None:
            self._assert_is_brightness(brightness)
            return self._driver.steps(self.brightness, brightness)

        return 0
1082782
function convertContinuation(t, callback) {
  log.debug('continuing from last traversal process (walker)');
  if (nextTickAvailable) {
    return process.nextTick(function() { // de-zalgo continuations
      callback(t);
    });
  }
  return callback(t);
}
1246791
function C(iid, left) {
        var aret;
        if (sandbox.analysis && sandbox.analysis.conditional) {
            aret = sandbox.analysis.conditional(iid, left);
            if (aret) {
                left = aret.result;
            }
        }

        lastVal = left;
        return (lastComputedValue = left);
    }