Adds a Z component from `pts` if it is missing.
    The value defaults to `value` (0.0)
349417
def pad_z(pts, value=0.0):
    """"""
    pts = np.asarray(pts)
    if pts.shape[-1] < 3:
        if len(pts.shape) < 2:
            return np.asarray((pts[0], pts[1], value), dtype=pts.dtype)
        pad_col = np.full(len(pts), value, dtype=pts.dtype)
        pts = np.asarray((pts.T[0], pts.T[1], pad_col)).T
    return pts
1149312
def _add_conversion(self, plugin, pbt):
        
        assert self.shape == pbt.shape
        assert len(self.inserts) == len(pbt.inserts)
        for (i, o) in zip(self.inserts, pbt.inserts):
            assert i.shape == o.shape
            assert i.kind == o.kind
            assert i.unevaluated == o.unevaluated
        if plugin not in self._plugins:
            self._plugins[plugin] = pbt
72566
def add(self, data, value=None, timestamp=None, namespace=None,
            debug=False):
        """"""
        if value is not None:
            return self.add(((data, value),), timestamp=timestamp,
                            namespace=namespace, debug=debug)
        writer = self.writer
        if writer is None:
            raise GaugedUseAfterFreeError
        if timestamp is None:
            timestamp = long(time() * 1000)
        config = self.config
        block_size = config.block_size
        this_block = timestamp // block_size
        this_array = (timestamp % block_size) // config.resolution
        if namespace is None:
            namespace = config.namespace
        if this_block < self.current_block or \
                (this_block == self.current_block and
                 this_array < self.current_array):
            if config.append_only_violation == Writer.ERROR:
                msg = 'Gauged is append-only; timestamps must be increasing'
                raise GaugedAppendOnlyError(msg)
            elif config.append_only_violation == Writer.REWRITE:
                this_block = self.current_block
                this_array = self.current_array
            else:
                return
        if isinstance(data, unicode):
            data = data.encode('utf8')
        if debug:
            return self.debug(timestamp, namespace, data)
        if this_block > self.current_block:
            self.flush_blocks()
            self.current_block = this_block
            self.current_array = this_array
        elif this_array > self.current_array:
            if not Gauged.writer_flush_arrays(writer, self.current_array):
                raise MemoryError
            self.current_array = this_array
        data_points = 0
        namespace_statistics = self.statistics[namespace]
        whitelist = config.key_whitelist
        skip_long_keys = config.key_overflow == Writer.IGNORE
        skip_gauge_nan = config.gauge_nan == Writer.IGNORE
        if isinstance(data, str) and skip_gauge_nan \
                and skip_long_keys and whitelist is None:  # fast path
            data_points = c_uint32(0)
            if not Gauged.writer_emit_pairs(writer, namespace, data,
                                            byref(data_points)):
                raise MemoryError
            data_points = data_points.value
        else:
            if isinstance(data, dict):
                data = data.iteritems()
            elif isinstance(data, str):
                data = self.parse_query(data)
            emit = Gauged.writer_emit
            for key, value in data:
                key = to_bytes(key)
                if whitelist is not None and key not in whitelist:
                    continue
                try:
                    value = float(value)
                except ValueError:
                    value = float('nan')
                if value != value:  # => NaN?
                    if skip_gauge_nan:
                        continue
                    raise GaugedNaNError
                success = emit(writer, namespace, key, c_float(value))
                if success != 1:
                    if not success:
                        raise MemoryError
                    elif success == Writer.KEY_OVERFLOW and not skip_long_keys:
                        msg = 'Key is larger than the driver allows '
                        msg += '(%s)' % key
                        raise GaugedKeyOverflowError(msg)
                data_points += 1
        namespace_statistics.data_points += data_points
        if self.flush_now:
            self.flush()
647290
def _missing_(cls, value):
        """"""
        if not (isinstance(value, int) and 0x00 <= value <= 0xFF):
            raise ValueError('%r is not a valid %s' % (value, cls.__name__))
        if 0x0D <= value <= 0xEF:
            extend_enum(cls, 'Unassigned [0x%s]' % hex(value)[2:].upper().zfill(2), value)
            return cls(value)
        if 0xF0 <= value <= 0xFF:
            # [RFC 7540]
            extend_enum(cls, 'Reserved for Experimental Use [0x%s]' % hex(value)[2:].upper().zfill(2), value)
            return cls(value)
        super()._missing_(value)
1216832
def set_value(self, complete_name, value):
        
        element = self.toc.get_element_by_complete_name(complete_name)

        if not element:
            logger.warning("Cannot set value for [%s], it's not in the TOC!",
                           complete_name)
            raise KeyError('{} not in param TOC'.format(complete_name))
        elif element.access == ParamTocElement.RO_ACCESS:
            logger.debug('[%s] is read only, no trying to set value',
                         complete_name)
            raise AttributeError('{} is read-only!'.format(complete_name))
        else:
            varid = element.ident
            pk = CRTPPacket()
            pk.set_header(CRTPPort.PARAM, WRITE_CHANNEL)
            if self._useV2:
                pk.data = struct.pack('<H', varid)
            else:
                pk.data = struct.pack('<B', varid)

            try:
                value_nr = eval(value)
            except TypeError:
                value_nr = value

            pk.data += struct.pack(element.pytype, value_nr)
            self.param_updater.request_param_setvalue(pk)
621590
def layout(self, value):
        ''

        if self._adjust_id:
            self._fix_component_id(value)
        return Dash.layout.fset(self, value)
127456
def AddValue(self, registry_value):
    
    name = registry_value.name.upper()
    if name in self._values:
      raise KeyError(
          'Value: {0:s} already exists.'.format(registry_value.name))

    self._values[name] = registry_value
38818
function(zCriticalValue) {
        var baselineP = this.baseline.pEstimate(zCriticalValue);
        var variationP = this.variation.pEstimate(zCriticalValue);
        var difference = variationP.value - baselineP.value;
        var standardError = Math.sqrt(Math.pow(baselineP.error, 2) + Math.pow(variationP.error, 2));
        return new Abba.ValueWithError(difference, standardError);
    }
328801
public void setZIndex(float zIndex) {
        shape.setZIndex(zIndex);
        for (ShapeMarkers shapeMarkers : shapeMarkersMap.values()) {
            shapeMarkers.setZIndex(zIndex);
        }
    }
451568
private void addMissingZeros()
    {
        //go back and add 0s for the onces we missed
        for (int i = 0; i < points.size(); i++)
            while(points.get(i).alpha.size() < this.points.get(0).vecs.size())
                points.get(i).alpha.add(0.0);
    }
28129
function elementAt(index, defaultValue) {
    if (index < 0) {
        throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"]();
    }
    var hasDefaultValue = arguments.length >= 2;
    return function (source) {
        return source.pipe(Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) { return i === index; }), Object(_take__WEBPACK_IMPORTED_MODULE_4__["take"])(1), hasDefaultValue
            ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue)
            : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__["throwIfEmpty"])(function () { return new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"](); }));
    };
}
1230189
def set_z(idx, val)
      check_bounds(idx)
      FFIGeos.GEOSCoordSeq_setZ_r(Geos.current_handle_pointer, ptr, idx, val.to_f)
    end
815195
def add_value(self, value, index_point):
        """"""
        if index_point not in self.index:
            self.values.append(value)
            self.index.append(index_point)
895962
def add(self, element, pad=0):
        
        set.add(self, int(element))
        if pad > 0 and self.padding is None:
            self.padding = pad
481462
def setZValue(self, value):
        
        super(XNodeConnection, self).setZValue(value)

        if self._textItem:
            self._textItem.setZValue(value)
491555
def _get_z(self, kwargs):
        '''
        
        '''
        if self._type == 1 or self._type == 2:
            if 'z' in kwargs:
                return round(float(kwargs['z']), 6)
            elif self._element_z in kwargs:
                return round(float(kwargs[self._element_z]), 6)
        raise TypeError()
424734
def add_empty_dataset(self, value=1):
        
        subdata = np.ones(self.grid.nr_of_elements) * value
        pid = self.add_data(subdata)
        return pid