// Create normalized array from ints
173777
func createFromInt(data [][]int) []*TabulateRow {
	rows := make([]*TabulateRow, len(data))
	for index_1, arr := range data {
		row := make([]string, len(arr))
		for index, el := range arr {
			row[index] = strconv.Itoa(el)
		}
		rows[index_1] = &TabulateRow{Elements: row}
	}
	return rows
}
982794
func Int32s(b0, b1 []int32) int {
	d := 0
	for i, x := range b0 {
		d += Int32(x, b1[i])
	}
	return d
}
387286
func (f *extFloat) Normalize() (shift uint) {
	mant, exp := f.mant, f.exp
	if mant == 0 {
		return 0
	}
	if mant>>(64-32) == 0 {
		mant <<= 32
		exp -= 32
	}
	if mant>>(64-16) == 0 {
		mant <<= 16
		exp -= 16
	}
	if mant>>(64-8) == 0 {
		mant <<= 8
		exp -= 8
	}
	if mant>>(64-4) == 0 {
		mant <<= 4
		exp -= 4
	}
	if mant>>(64-2) == 0 {
		mant <<= 2
		exp -= 2
	}
	if mant>>(64-1) == 0 {
		mant <<= 1
		exp -= 1
	}
	shift = uint(f.exp - exp)
	f.mant, f.exp = mant, exp
	return
}
707561
func (a *AttemptList) Normalize() error {
	for q, vals := range a.GetTo() {
		if vals == nil {
			a.To[q] = &AttemptList_Nums{}
		} else {
			if err := vals.Normalize(); err != nil {
				return err
			}
		}
	}
	return nil
}
1225305
func (enc *Encoder) SliceInt(s []int) {
	enc.Array(EncodeArrayFunc(func(enc *Encoder) {
		for _, i := range s {
			enc.Int(i)
		}
	}))
}
781383
func Ints(reply interface{}, err error) ([]int, error) {
    values, err := Values(reply, err)
    if err != nil {
	return nil, err
    }

    ints := make([]int, len(values))
    slice := make([]interface{}, len(values))
    for i, _ := range ints {
	slice[i] = &ints[i]
    }

    if _, err = Scan(values, slice...); err != nil {
	return nil, err
    }

    return ints, nil
}
1250147
func (ia *Int64Array) Int64ArrayOr(or []int64) []int64 {
	switch {
	case ia == nil:
		return or
	case !ia.Valid:
		return or
	default:
		return ia.Int64Array
	}
}
291534
func (e *Event) Ints(key string, i []int) *Event {
	if e == nil {
		return e
	}
	e.buf = enc.AppendInts(enc.AppendKey(e.buf, key), i)
	return e
}
935989
func IntSlice(s Interface) []int {
	slice := make([]int, 0)
	for _, item := range s.List() {
		v, ok := item.(int)
		if !ok {
			continue
		}

		slice = append(slice, v)
	}
	return slice
}
885277
func int8ArrayToByteArray(in []int8) []byte {
	bts := make([]byte, len(in))
	for i, c := range in {
		bts[i] = byte(c)
	}
	return bytes.Trim(bts, "\x00")
}
1045801
func normalizeNumber(v interface{}) (n interface{}, err error) {
	switch t := v.(type) {

	case json.Number:
		if strings.Contains(t.String(), ".") {
			n, err = t.Float64()
		} else {
			n, err = t.Int64()
		}

	case float32:
		n = float64(t)
	case float64:
		n = t

	case int:
		n = int64(t)
	case int8:
		n = int64(t)
	case int16:
		n = int64(t)
	case int32:
		n = int64(t)
	case int64:
		n = t

	case uint8:
		n = int64(t)
	case uint16:
		n = int64(t)
	case uint32:
		n = int64(t)
	case uint64:
		n = t
		err = fmt.Errorf("%s is not a supported type", reflect.TypeOf(v))

	default:
		n = t
	}

	return
}
555056
func (k *Key) Int64s(delim string) []int64 {
	vals, _ := k.parseInt64s(k.Strings(delim), true, false)
	return vals
}
1263939
func (p *parserMixin) Ints() (target *[]int) {
	target = new([]int)
	p.IntsVar(target)
	return
}
381131
func ConvertInterfaceArrayToStringArray(interfaceArray []interface{}) []string {
	stringArray := make([]string, 0)
	for _, item := range interfaceArray {
		v, ok := item.(string)
		if ok {
			stringArray = append(stringArray, v)
		}
	}
	return stringArray
}
826342
func createJsonArray(dataset []string) (data string, err error) {

	var (
		results []interface{}
		set     []byte
		value   interface{}
	)

	results = make([]interface{}, len(dataset))

	for index, item := range dataset {
		set = []byte(item)
		err = json.Unmarshal(set, &value)
		if err != nil {
			// unable to convert json to interface.... doh
			data = ""
			return
		}
		results[index] = value
	}

	// now that we've got an array of results, marshal back to string
	if set, err = json.Marshal(results); err != nil {
		data = ""
		return
	} else {
		data = string(set)
	}
	return data, err
}
1133828
func (a *AttemptList_Nums) Normalize() error {
	if len(a.Nums) == 0 || (len(a.Nums) == 1 && a.Nums[0] == 0) {
		a.Nums = nil
		return nil
	}
	slc := revUint32Slice(a.Nums)
	sort.Sort(slc)
	if a.Nums[len(a.Nums)-1] == 0 {
		return errors.New("AttemptList.Nums contains 0 as well as other values.")
	}
	a.Nums = a.Nums[:set.Uniq(slc)]
	return nil
}
382611
func NewInts(into *[]int, v []int) *IntsValue {
	*into = v
	return (*IntsValue)(into)
}