Create an empty data set. Empty means: all elements have the same
        value.

        Parameters
        ----------
        value: float, optional
            which value to assign all element parameters. Default is one.
424734
def add_empty_dataset(self, value=1):
        
        subdata = np.ones(self.grid.nr_of_elements) * value
        pid = self.add_data(subdata)
        return pid
511551
def _is_null_value(self, value):
        
        if value is None:
            return True

        if IS_PY3:
            # Python 3.X
            if isinstance(value, str) and len(value) == 0:
                return True
        else:
            # Python 2.X
            if isinstance(value, basestring) and len(value) == 0:  # NOQA: F821
                return True

        # TODO: This should probably be removed when solved in core Solr level?
        return False
50357
def elements(self, value):
        

        if value is not None:
            assert type(value) is dict, "'{0}' attribute: '{1}' type is not  dict'!".format("elements", value)
        self.__elements = value
671175
private ScatterData value(Object... values) {
        if (values == null || values.length == 0) {
            return this;
        }
        this.value().addAll(Arrays.asList(values));
        return this;
    }
306201
def to_float_with_default(value, default_value):
        
        result = FloatConverter.to_nullable_float(value)
        return result if result != None else default_value
502656
def data(self, value):
        
        if value == self._defaults['data'] and 'data' in self._values:
            del self._values['data']
        else:
            self._values['data'] = value
512081
def _parse_float(value, default=None):
    
    if value is None:
        return default
    try:
        return float(value)
    except ValueError:
        print "Couldn't cast value to `float`."
        return default
469850
def empty(val):
    
    if val == None:
        return True

    if isinstance(val,str) and len(val) > 0:
        return False

    return True
500643
def empty_values(obj)
      values = case obj
               when Hash         then obj
               when StripeObject then obj.instance_variable_get(:@values)
               else
                 raise ArgumentError, "#empty_values got unexpected object type: #{obj.class.name}"
               end

      values.each_with_object({}) do |(k, _), update|
        update[k] = ""
      end
    end
356589
def reduce_value(value, default=EMPTY_STR):
    

    if hasattr(value, '__len__'):
        vlen = len(value)

        if vlen == 0:
            return default
        elif vlen == 1:
            if isinstance(value, set):
                return value.pop()
            elif isinstance(value, _reduce_types):
                return value[0]

    return default if value is None else value
1328987
def is_empty(self):
        
        if len(self.data) == 0:
            return True
        for v in self.data.values():
            if is_sequence(v):
                if len(v) == 0:
                    return True
                else:
                    return False
            elif bool(np.isreal(v)):
                return False
        return True
306351
synchronized public void set(Element value) {
    int bind = ((int)value.getIndex() & Integer.MAX_VALUE) % buckets.length;
    Element[] bucket = buckets[bind];
    int count = counts[bind];
    if (bucket == null)
      buckets[bind] = bucket = new Element[initBucketSize];
    else if (bucket.length == count) {
      bucket = new Element[count * 2];
      System.arraycopy(buckets[bind], 0, bucket, 0, count);
      buckets[bind] = bucket;
    }
    bucket[count] = value;
    counts[bind] = count + 1;
    totalSize += 1;
  }
897718
def set_if_empty(self, param, default):
        
        if not self.has(param):
            self.set(param, default)
864912
def empty_content?(element)
        text = +""
        child_nodes = element.child_nodes
        (0...child_nodes.length).each do |i|
          item = child_nodes.item(i)
          if item.node_type == Node.TEXT_NODE
            text << item.get_data.strip
          end
        end
        text.strip.length == 0
      end
796698
public Element append(ICalDataType dataType, String value) {
		String dataTypeStr = toLocalName(dataType);
		return append(dataTypeStr, value);
	}
365142
def _load(self, value: Any):
        

        if value in self.empty_values:
            # If a default has been set for the field return it
            if self.default is not None:
                default = self.default
                value = default() if callable(default) else default
                return value

            # If no default is set and this field is required
            elif self.required:
                self.fail('required')

            # In all other cases just return `None` as we do not want to
            # run validations against an empty value
            else:
                return None

        # If choices exist then validate that value is be one of the choices
        if self.choices:
            value_list = value
            if not isinstance(value, (list, tuple)):
                value_list = [value]
            for v in value_list:
                if v not in self.choice_dict:
                    self.fail(
                        'invalid_choice', value=v,
                        choices=list(self.choice_dict))

        # Cast and Validate the value for this Field
        value = self._cast_to_type(value)

        # Call the rest of the validators defined for this Field
        self._run_validators(value)

        return value
745826
function( value ) {
			var error;
			try {
				if ( value.length ) {
					error = {
						'rule': 'isEmpty',
						'message': 'ERROR:provided value[' + value +'] is not empty.'
					};
					return [ error ];
				}
			} catch ( e ) {
				if ( _.isPlainObject( value ) ) {
					for ( var key in value ) {
						if ( value.hasOwnProperty( key ) ) {
							error = {
								'rule': 'isEmpty',
								'message': 'ERROR:provided value[' + value +'] is not empty.'
							};
							return [ error ];
						}
					} // end FOR key
				}
				error = {
					'rule': 'isEmpty',
					'message': 'ERROR:input data type is not compatible with this rule.'
				};
				return [ error ];
			}
		}