Ensures that the argument is a list that either is empty or contains only GPParamSpec's
        :param arr: list
        :return:
967089
def _all_params(arr):
        
        if not isinstance([], list):
            raise TypeError("non-list value found for parameters")
        return all(isinstance(x, GPParamSpec) for x in arr)
751748
function contains( arr, value ) {
	var len, i;
	if ( !isArray( arr ) ) {
		throw new TypeError( 'contains()::invalid input argument. First argument must be an array. Value: `' + arr + '`.' );
	}
	len = arr.length;
	if ( isnan( value ) ) {
		for ( i = 0; i < len; i++ ) {
			if ( isnan( arr[ i ] ) ) {
				return true;
			}
		}
		return false;
	}
	for ( i = 0; i < len; i++ ) {
		if ( arr[ i ] === value ) {
			return true;
		}
	}
	return false;
}
1228821
def _flatten(cls, arr) -> List[float]:
        
        if isinstance(arr, cls.SCALAR_ACTION_TYPES):
            arr = [float(arr)]
        if isinstance(arr, np.ndarray):
            arr = arr.tolist()
        if len(arr) == 0:
            return arr
        if isinstance(arr[0], np.ndarray):
            arr = [item for sublist in arr for item in sublist.tolist()]
        if isinstance(arr[0], list):
            arr = [item for sublist in arr for item in sublist]
        arr = [float(x) for x in arr]
        return arr
346231
def gdaArray(arry, dtype, numGhosts=1):
    
    a = numpy.array(arry, dtype)
    res = GhostedDistArray(a.shape, a.dtype)
    res.setNumberOfGhosts(numGhosts)
    res[:] = a
    return res
1276032
def _ensure_array_list(arrays):
    """"""
    # Note: the isinstance test is needed below so that instances of FieldArray
    # are not converted to numpy arrays
    return [numpy.array(arr, ndmin=1) if not isinstance(arr, numpy.ndarray)
            else arr for arr in arrays]
1072186
function isEmptyArray(v) {
	if ((v instanceof Uint8Array) || (v instanceof Int8Array) ||
		(v instanceof Uint16Array) || (v instanceof Int16Array) ||
		(v instanceof Uint32Array) || (v instanceof Int32Array) ||
		(v instanceof Float32Array) || (v instanceof Float64Array) ||
		(v instanceof Array) ) {
		return (v.length === 0);
	}
	return false;
}
347203
def is_an_array(var, allow_none=False):
    
    return isinstance(var, np.ndarray) or (var is None and allow_none)
591058
def _contains_array(self, val):
        """"""
        arr = self(arr_name=val.psy.arr_name)[0]
        is_not_list = any(
            map(lambda a: not isinstance(a, InteractiveList),
                [arr, val]))
        is_list = any(map(lambda a: isinstance(a, InteractiveList),
                          [arr, val]))
        # if one is an InteractiveList and the other not, they differ
        if is_list and is_not_list:
            return False
        # if both are interactive lists, check the lists
        if is_list:
            return all(a in arr for a in val) and all(a in val for a in arr)
        # else we check the shapes and values
        return arr is val
892456
def _validate_param(self, expected, param):
        
        ok, msg = self.contract.validate(expected, expected.is_array, param)
        if not ok:
            vals = (self.full_name, expected.name, msg)
            msg = "Function '%s' invalid param '%s'. %s" % vals
            raise RpcException(ERR_INVALID_PARAMS, msg)
1061513
function encodeArray_EMPTY( encoder ) {

	//
	// Empty Array (EMPTY)
	//
	// ........
	// 01111110
	//

	encoder.counters.arr_empty+=1;
	encoder.log(LOG.ARR, "array.empty");
	encoder.stream8.write( pack1b( ARR_OP.EMPTY ) );
	encoder.counters.op_prm+=1;

}
820765
def emptyArray(key, add_label=None):
    """"""

    result = {
        'key': key,
        'startEmpty': True
    }
    if add_label is not None:
        result['add'] = add_label
        result['style'] = {'add': 'btn-success'}
    return result
1154649
def safe_pdist(arr, *args, **kwargs):
    
    if arr is None or len(arr) < 2:
        return None
    else:
        import vtool as vt
        arr_ = vt.atleast_nd(arr, 2)
        return spdist.pdist(arr_, *args, **kwargs)
110329
function arrayIncludes(arr, v) {
  for (let i = 0, len = arr.length; i < len; i++) {
    const av = arr[i];

    if (Tyr.isEqual(av, v)) {
      return true;
    }
  }

  return false;
}
175464
def _is_list(arg):
    """"""
    if isinstance(arg, dict):
        return False
    if isinstance(arg, str): # Python 3-only, as str has __iter__
        return False
    return (not _has_method(arg, "strip")
            and _has_method(arg, "__getitem__")
            or _has_method(arg, "__iter__"))
1250645
private static List<String> filterDelimeterElement(List<String> arr, char[] delimeter){
        List<String> list = new ArrayList<String>();
        for(String s : arr){
            if(s == null || s.isEmpty()){
                continue;
            }
            if(s.length() > 1){
                list.add(s);
                continue;
            }
            char strChar = s.charAt(0);
            boolean find = false;
            for(char c : delimeter){
                if(c == strChar){
                    find = true;
                    break;
                }
            }
            if(find == false){
                list.add(s);
            }
        }
        return list;
    }
1005954
def _validate_str_list(arg):
    '''
    
    '''
    if isinstance(arg, six.binary_type):
        ret = [salt.utils.stringutils.to_unicode(arg)]
    elif isinstance(arg, six.string_types):
        ret = [arg]
    elif isinstance(arg, Iterable) and not isinstance(arg, Mapping):
        ret = []
        for item in arg:
            if isinstance(item, six.string_types):
                ret.append(item)
            else:
                ret.append(six.text_type(item))
    else:
        ret = [six.text_type(arg)]
    return ret
284974
def _all_correct_list(array):
    
    if type(array) not in _ITERABLE_TYPES:
        return False

    for item in array:
        if not type(item) in _ITERABLE_TYPES:
            return False

        if len(item) != 2:
            return False

    return True