Calculate the absolute value element-wise.

        Returns:
          absolute (Timeseries):
            Absolute value. For complex input (a + b*j) gives sqrt(a**a + b**2)
329972
def absolute(self):
        
        da = distob.vectorize(np.absolute)(self)
        return _dts_from_da(da, self.tspan, self.labels)
613172
def bool(self):
        
        v = self.squeeze()
        if isinstance(v, (bool, np.bool_)):
            return bool(v)
        elif is_scalar(v):
            raise ValueError("bool cannot act on a non-boolean single element "
                             "{0}".format(self.__class__.__name__))

        self.__nonzero__()
331303
def compute_absolute_error(self, predicted_data, record, dataframe_record):
        ''''''
        absolute_error = abs(record['DDG'] - predicted_data[self.ddg_analysis_type])
        dataframe_record['AbsoluteError'] = absolute_error
1109492
function absolute(rem){return{abs:{position:'absolute'},
top0:{top:0},
right0:{right:0},
bottom0:{bottom:0},
left0:{left:0},

top1:{top:1*rem},
right1:{right:1*rem},
bottom1:{bottom:1*rem},
left1:{left:1*rem},

top2:{top:2*rem},
right2:{right:2*rem},
bottom2:{bottom:2*rem},
left2:{left:2*rem},

top3:{top:3*rem},
right3:{right:3*rem},
bottom3:{bottom:3*rem},
left3:{left:3*rem},

top4:{top:4*rem},
right4:{right:4*rem},
bottom4:{bottom:4*rem},
left4:{left:4*rem},

z1:{zIndex:1,elevation:1},
z2:{zIndex:2,elevation:2},
z3:{zIndex:4,elevation:4},
z4:{zIndex:8,elevation:8}};

}
548235
def _get_median_absolute_deviation(self, series, multiplier=3):
        
        capped_series = np.minimum(
            series, series.median() + multiplier * series.mad())
        count = pd.value_counts(series != capped_series)
        count = count[True] if True in count else 0
        perc = self._percent(count / self.length)
        return count, perc
940503
function absoluteValue(node) {
  if (!Node.Type.isFunction(node, 'abs')) {
    return Node.Status.noChange(node);
  }
  if (node.args.length > 1) {
    return Node.Status.noChange(node);
  }
  let newNode = clone(node);
  const argument = newNode.args[0];
  if (Node.Type.isConstant(argument, true)) {
    newNode = Node.Creator.constant(math.abs(argument.eval()));
    return Node.Status.nodeChanged(
      ChangeTypes.ABSOLUTE_VALUE, node, newNode);
  }
  else if (Node.Type.isConstantFraction(argument, true)) {
    const newNumerator = Node.Creator.constant(
      math.abs(argument.args[0].eval()));
    const newDenominator =  Node.Creator.constant(
      math.abs(argument.args[1].eval()));
    newNode = Node.Creator.operator('/', [newNumerator, newDenominator]);
    return Node.Status.nodeChanged(
      ChangeTypes.ABSOLUTE_VALUE, node, newNode);
  }
  else {
    return Node.Status.noChange(node);
  }
}
795243
def probabilities(self) -> bk.BKTensor:
        
        value = bk.absolute(self.tensor)
        return value * value
1189253
def getvalue(self):
		
		bitset = [0] * self.width
		zero = [1] * self.width

		for shift in range(self.width):
			bitset[shift] = (self._value & (1 << shift)) >> shift
		sign = 0
		if((not bitset[-1]) and self._sign):
			bitset[-1] = 1
			sign = 1
		elif(bitset[-1]):
			bitset = bitsetxor(bitset, zero)
			sign = 1
		
		value = [ bitset[shift] << shift for shift in range(self.width - 1)]
		value = sum(value)
		if(sign):
			return -1 * value
		return value
134120
def _compute(self):
        """"""
        positive_vals, negative_vals = self._get_separated_values()

        if self.logarithmic:
            positive_vals = list(
                filter(lambda x: x > self.zero, positive_vals)
            )
            negative_vals = list(
                filter(lambda x: x > self.zero, negative_vals)
            )

        self._compute_box(positive_vals, negative_vals)
        positive_vals = positive_vals or [self.zero]
        negative_vals = negative_vals or [self.zero]

        self._x_pos = [
            x / self._len for x in range(self._len + 1)
        ] if self._len > 1 else [0, 1]  # Center if only one value

        self._points(self._x_pos)

        self.negative_cumulation = [0] * self._len
        self.positive_cumulation = [0] * self._len

        if self.secondary_series:
            positive_vals, negative_vals = self._get_separated_values(True)
            positive_vals = positive_vals or [self.zero]
            negative_vals = negative_vals or [self.zero]
            self.secondary_negative_cumulation = [0] * self._len
            self.secondary_positive_cumulation = [0] * self._len
            self._pre_compute_secondary(positive_vals, negative_vals)

        self._x_pos = [(i + .5) / self._len for i in range(self._len)]
211583
def incremental_value(self, slip_moment, mmax, mag_value, bbar, dbar):
        
        delta_m = mmax - mag_value
        dirac_term = np.zeros_like(mag_value)
        dirac_term[np.fabs(delta_m) < 1.0E-12] = 1.0
        a_1 = self._get_a1(bbar, dbar, slip_moment, mmax)
        return a_1 * (bbar * np.exp(bbar * delta_m) * (delta_m > 0.0)) +\
            a_1 * dirac_term
72008
def BCD_calc(TOP, P, AM):
    
    try:
        TOP_sum = sum(TOP.values())
        P_sum = sum(P.values())
        return abs(AM) / (P_sum + TOP_sum)
    except Exception:
        return "None"
919138
def numeric_value(self):
        """"""
        numeric_value = self._element_dict.get("numeric_value")
        return np.nan if numeric_value is None else numeric_value
734358
def getIndexForValue(self, value):
        
        return math.trunc(self.slope * float(value) + self.intercept)
1063365
def abs(self):
        
        return self._constructor(np.abs(self.values),
                                 index=self.index).__finalize__(self)
1119903
def get_absolute_time(self, key):
        
        keyframe = self.dct[key]
        try:
            # if absolute time is already calculated, return that
            return keyframe['__abs_time__']
        except KeyError:
            # if not, calculate by adding relative time to parent's time
            if keyframe['parent'] is None:
                keyframe['__abs_time__'] = keyframe['time']
            else:
                parent_time = self.get_absolute_time(keyframe['parent'])
                abs_time = keyframe['time'] + parent_time
                keyframe['__abs_time__'] = abs_time
            return keyframe['__abs_time__']
190627
def _get_value_type(self, other):
        
        if self.values:
            return type(self.values[0])
        elif isinstance(other, TimeSeries) and other.values:
            return type(other.values[0])
        else:
            raise ValueError('Cannot perform arithmetic on empty time series.')
1254270
def getBottomLeft(self):
        
        return (float(self.get_cx()) - float(self.get_r()), float(self.get_cy()) - float(self.get_r()))