Takes a comma separated list of ints, and returns an array of Integers. This is used when processing custom injection
points.
425614
private static List<InjectionData> processIdList(final String list) {
        /* find the individual topic ids */
        final String[] ids = list.split(",");

        List<InjectionData> retValue = new ArrayList<InjectionData>(ids.length);

        /* clean the topic ids */
        for (final String id : ids) {
            final String topicId = id.replaceAll(OPTIONAL_MARKER, "").trim();
            final boolean optional = id.contains(OPTIONAL_MARKER);

            try {
                final InjectionData topicData = new InjectionData(topicId, optional);
                retValue.add(topicData);
            } catch (final NumberFormatException ex) {
                /*
                 * these lists are discovered by a regular expression so we shouldn't have any trouble here with Integer.parse
                 */
                LOG.debug("Unable to convert Injection Point ID into a Number", ex);
                retValue.add(new InjectionData("-1", false));
            }
        }

        return retValue;
    }
268383
def decode_list(self, integers):
    """"""
    integers = list(np.squeeze(integers))
    return self.encoders["inputs"].decode_list(integers)
729841
private static double[] numberListToDoubleArray(List<Number> listOfNumbers) {
		double[] arrayOfDoubles	= new double[listOfNumbers.size()];
		for(int i=0; i<arrayOfDoubles.length; i++) {
			arrayOfDoubles[i] = listOfNumbers.get(i).doubleValue();
		}
		return arrayOfDoubles;
	}
1160465
static public final int[] RLEStringToIntArray(String s) {
        int length = getInt(s, 0);
        int[] array = new int[length];
        int ai = 0, i = 1;

        int maxI = s.length() / 2;
        while (ai < length && i < maxI) {
            int c = getInt(s, i++);

            if (c == ESCAPE) {
                c = getInt(s, i++);
                if (c == ESCAPE) {
                    array[ai++] = c;
                } else {
                    int runLength = c;
                    int runValue = getInt(s, i++);
                    for (int j=0; j<runLength; ++j) {
                        array[ai++] = runValue;
                    }
                }
            }
            else {
                array[ai++] = c;
            }
        }

        if (ai != length || i != maxI) {
            throw new IllegalStateException("Bad run-length encoded int array");
        }

        return array;
    }
1137926
public static int[][] toInt(double[][] array) {
        int[][] n = new int[array.length][array[0].length];
        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array[0].length; j++) {
                n[i][j] = (int) array[i][j];
            }
        }
        return n;
    }
387945
static Integer[] createIntegers() {
        int len = INTEGER_UPPER_BOUND - INTEGER_LOWER_BOUND + 1;
        Integer[] ret = new Integer[len];
        int val = (int) INTEGER_LOWER_BOUND;
        for (int i = 0; i < len; i++, val++) {
            ret[i] = new Integer(val);
        }
        return ret;
    }
1061893
public static Integer[] transformToInt(final String[] ids) {
    if (ids == null) return new Integer[0];
    Integer[] idsOfInteger = new Integer[ids.length];
    for (int i = 0; i < ids.length; i++) {
      idsOfInteger[i] = new Integer(ids[i]);
    }
    return idsOfInteger;
  }
191999
public static int[] parseInts(String nums, String sperator) {
        String[] ss = StringUtils.split(nums, sperator);
        int[] ints = new int[ss.length];
        for (int i = 0; i < ss.length; i++) {
            ints[i] = Integer.parseInt(ss[i]);
        }
        return ints;
    }
1329583
private static List<Integer> parseArray(String value, ValueParser parser){
		final List<Integer> values = new ArrayList<>();
	
		final List<String> parts = StrUtil.split(value, StrUtil.C_COMMA);
		for (String part : parts) {
			CollectionUtil.addAllIfNotContains(values, parseStep(part, parser));
		}
		return values;
	}
580791
public int[] toArray() {
    int[] ret = new int[len];
    for(int i = 0; i < len; i++) {
      ret[i] = buf[i];
    }
    return ret;
  }
694407
def _return_comma_list(self, l):
        
        if isinstance(l, (text_type, int)):
            return l

        if not isinstance(l, list):
            raise TypeError(l, ' should be a list of integers, \
not {0}'.format(type(l)))

        str_ids = ','.join(str(i) for i in l)

        return str_ids
190923
private static int[] parseIntList(
            String commaSeparatedString, int absmin, int absmax, IcalSchema schema)
            throws ParseException {

        String[] parts = COMMA.split(commaSeparatedString);
        int[] out = new int[parts.length];
        for (int i = parts.length; --i >= 0; ) {
            try {
                int n = Integer.parseInt(parts[i]);
                int absn = Math.abs(n);
                if (!(absmin <= absn && absmax >= absn)) {
                    schema.badPart(commaSeparatedString, null);
                }
                out[i] = n;
            } catch (NumberFormatException ex) {
                schema.badPart(commaSeparatedString, ex.getMessage());
            }
        }
        return out;
    }
143598
def c_int_array(data):
    """"""
    if is_1d_list(data):
        data = np.array(data, copy=False)
    if is_numpy_1d_array(data):
        data = convert_from_sliced_object(data)
        assert data.flags.c_contiguous
        if data.dtype == np.int32:
            ptr_data = data.ctypes.data_as(ctypes.POINTER(ctypes.c_int32))
            type_data = C_API_DTYPE_INT32
        elif data.dtype == np.int64:
            ptr_data = data.ctypes.data_as(ctypes.POINTER(ctypes.c_int64))
            type_data = C_API_DTYPE_INT64
        else:
            raise TypeError("Expected np.int32 or np.int64, met type({})"
                            .format(data.dtype))
    else:
        raise TypeError("Unknown type({})".format(type(data).__name__))
    return (ptr_data, type_data, data)
484820
public static Integer[] wrap(int... values) {
		if (null == values) {
			return null;
		}
		final int length = values.length;
		if (0 == length) {
			return new Integer[0];
		}

		final Integer[] array = new Integer[length];
		for (int i = 0; i < length; i++) {
			array[i] = Integer.valueOf(values[i]);
		}
		return array;
	}
911003
public static int[] parseInts(String[] intStrings) {
    int[] values = new int[intStrings.length];
    for (int i = 0; i < intStrings.length; i++) {
      values[i] = Integer.parseInt(intStrings[i].trim());
    }
    return values;
  }
1045396
def int_to_array(i, length=2):
    """"""
    res = []
    for dummy in range(0, length):
        res.append(i & 0xff)
        i = i >> 8
    return reversed(res)
411189
public static int[] stringsToInts(String[] stringreps) {
		int[] nums = new int[stringreps.length];
		for (int i = 0; i < stringreps.length; i++)
			nums[i] = Integer.parseInt(stringreps[i]);
		return nums;
	}