Subtract a constant value or an image from all images.

        Parameters
        ----------
        val : int, float, or ndarray
            Value to subtract.
359447
def subtract(self, val):
        
        if isinstance(val, ndarray):
            if val.shape != self.value_shape:
                raise Exception('Cannot subtract image with dimensions %s '
                                'from images with dimension %s' % (str(val.shape), str(self.value_shape)))

        return self.map(lambda x: x - val, value_shape=self.value_shape)
602618
public void subtract(Object o) {
    Integer count = (Integer) cset.get(o);  
    if ( count != null ) { 
      int c = count.intValue()-1;
      if (c == 0) {
        cset.remove(o);
      }
      else {
        cset.put(o, new Integer(c)); 
      }
    }
  }
212835
def as_int(self, val: Tuple[str]) -> int:
        """"""
        res = 0
        try:
            for b in val:
                res += 1 << self.bit[b]
        except KeyError:
            return None
        return res
555154
def subtract(self, other):
        
        self_estimate = getattr(self, self._estimate_name)
        other_estimate = getattr(other, other._estimate_name)
        new_index = np.concatenate((other_estimate.index, self_estimate.index))
        new_index = np.unique(new_index)
        return pd.DataFrame(
            self_estimate.reindex(new_index, method="ffill").values
            - other_estimate.reindex(new_index, method="ffill").values,
            index=new_index,
            columns=["diff"],
        )
1016211
def Y(self, value):
        
        if isinstance(value, (int, float,
                              long, types.NoneType)):
            self._y = value
296758
def plot_subtract_from_data_all(self):
        
        f, axes = plt.subplots(2, 3, figsize=(16, 8))

        self.subtract_from_data_plot(ax=axes[0, 0], text='Data')
        self.subtract_from_data_plot(ax=axes[0, 1], text='Data - Point Source', point_source_add=True)
        self.subtract_from_data_plot(ax=axes[0, 2], text='Data - Lens Light', lens_light_add=True)
        self.subtract_from_data_plot(ax=axes[1, 0], text='Data - Source Light', source_add=True)
        self.subtract_from_data_plot(ax=axes[1, 1], text='Data - Source Light - Point Source', source_add=True,
                                         point_source_add=True)
        self.subtract_from_data_plot(ax=axes[1, 2], text='Data - Lens Light - Point Source', lens_light_add=True,
                                         point_source_add=True)
        f.tight_layout()
        f.subplots_adjust(left=None, bottom=None, right=None, top=None, wspace=0., hspace=0.05)
        return f, axes
1113444
public void fill(double val ) {
        try {
            ops.fill(mat, val);
        } catch( ConvertToDenseException e) {
            convertToDense();
            fill(val);
        }
    }
568505
def gt(self, value):
        
        self.op = '>'
        self.negate_op = '<='
        self.value = self._value(value)
        return self
994764
void subtract(Scalar o)
    {
        if (!type.equals(o.type))
        {
            throw new UnsupportedOperationException("Action with wrong kind of class");
        }
        value -= o.value;
    }
561970
def constant(self, val, ty):
        
        if isinstance(val, VexValue) and not isinstance(val, IRExpr):
            raise Exception('Constant cannot be made from VexValue or IRExpr')
        rdt = self.irsb_c.mkconst(val, ty)
        return VexValue(self.irsb_c, rdt)
1338170
public double subtract(int[] indices, double val) {
        checkIndices(indices);
        int c = getConfigIdx(indices);
        double prev = values[c];
        values[c] = s.minus(values[c], val);
        return prev;
    }
869512
def sub(self, num):
        
        try:
            val = self.value() - num
        except:
            val = -num
        self.set(max(0, val))
712081
def set_val(self, nval):
        
        file_obj = file(os.path.join(self._base, self._attr), 'w')
        try:
            file_obj.write(str(nval) + '\n')
        finally:
            file_obj.close()
297963
def get_and_subtract(self, delta):
        '''
        
        '''
        with self._reference.get_lock():
            oldval = self._reference.value
            self._reference.value -= delta
            return oldval
178593
def fn_int(self, value):
        

        if is_ndarray(value) or isinstance(value, (list, tuple)):
            return self._to_ndarray(value).astype('int')
        else:
            return int(value)
1125668
public void subtract(Vector v)
	{
		x = x - v.x;
		y = y - v.y;
		z = z - v.z;
	}
1216373
def subtract_and_get(self, delta):
        '''
        
        '''
        with self._reference.get_lock():
            self._reference.value -= delta
            return self._reference.value