func (tsr *Int) Range() (min, max float64, minIdx, maxIdx int) {
	minIdx = -1
	maxIdx = -1
	for j, vl := range tsr.Values {
		fv := float64(vl)
		if math.IsNaN(fv) {
			continue
		}
		if fv < min || minIdx < 0 {
			min = fv
			minIdx = j
		}
		if fv > max || maxIdx < 0 {
			max = fv
			maxIdx = j
		}
	}
	return
}
Range returns the min, max (and associated indexes, -1 = no values) for the tensor.
This is needed for display and is thus in the core api in optimized form
Other math operations can be done using gonum/floats package.
package etensor
import (
	"errors"
	"fmt"
	"log"
	"math"
	"strconv"
	"unsafe"
	"github.com/apache/arrow/go/arrow/array"
	"github.com/apache/arrow/go/arrow/memory"
	"github.com/apache/arrow/go/arrow/tensor"
	"github.com/emer/etable/bitslice"
	"github.com/goki/ki/ints"
	"github.com/goki/ki/kit"
	"gonum.org/v1/gonum/mat"
)
type Int struct {
	Shape
	Values []int
	Nulls  bitslice.Slice
	Meta   map[string]string
}
func NewInt(shape, strides []int, names []string) *Int {
	tsr := &Int{}
	tsr.SetShape(shape, strides, names)
	tsr.Values = make([]int, tsr.Len())
	return tsr
}
func NewIntShape(shape *Shape, vals []int) *Int {
	tsr := &Int{}
	tsr.CopyShape(shape)
	if vals != nil {
		if len(vals) != tsr.Len() {
			log.Printf("etensor.New*Shape: length of provided vals: %d not proper length: %d", len(vals), tsr.Len())
			tsr.Values = make([]int, tsr.Len())
		} else {
			tsr.Values = vals
		}
	} else {
		tsr.Values = make([]int, tsr.Len())
	}
	return tsr
}
func (tsr *Int) ShapeObj() *Shape     { return &tsr.Shape }
func (tsr *Int) DataType() Type       { return INT }
func (tsr *Int) Value(i []int) int    { j := tsr.Offset(i); return tsr.Values[j] }
func (tsr *Int) Value1D(i int) int    { return tsr.Values[i] }
func (tsr *Int) Set(i []int, val int) { j := tsr.Offset(i); tsr.Values[j] = val }
func (tsr *Int) Set1D(i int, val int) { tsr.Values[i] = val }
func (tsr *Int) IsNull(i []int) bool {
	if tsr.Nulls == nil {
		return false
	}
	j := tsr.Offset(i)
	return tsr.Nulls.Index(j)
}
func (tsr *Int) IsNull1D(i int) bool {
	if tsr.Nulls == nil {
		return false
	}
	return tsr.Nulls.Index(i)
}
func (tsr *Int) SetNull(i []int, nul bool) {
	if tsr.Nulls == nil {
		tsr.Nulls = bitslice.Make(tsr.Len(), 0)
	}
	j := tsr.Offset(i)
	tsr.Nulls.Set(j, nul)
}
func (tsr *Int) SetNull1D(i int, nul bool) {
	if tsr.Nulls == nil {
		tsr.Nulls = bitslice.Make(tsr.Len(), 0)
	}
	tsr.Nulls.Set(i, nul)
}
func (tsr *Int) FloatVal(i []int) float64      { j := tsr.Offset(i); return float64(tsr.Values[j]) }
func (tsr *Int) SetFloat(i []int, val float64) { j := tsr.Offset(i); tsr.Values[j] = int(val) }
func (tsr *Int) StringVal(i []int) string { j := tsr.Offset(i); return kit.ToString(tsr.Values[j]) }
func (tsr *Int) SetString(i []int, val string) {
	if fv, err := strconv.ParseFloat(val, 64); err == nil {
		j := tsr.Offset(i)
		tsr.Values[j] = int(fv)
	}
}
func (tsr *Int) FloatVal1D(off int) float64      { return float64(tsr.Values[off]) }
func (tsr *Int) SetFloat1D(off int, val float64) { tsr.Values[off] = int(val) }
func (tsr *Int) FloatValRowCell(row, cell int) float64 {
	_, sz := tsr.RowCellSize()
	return float64(tsr.Values[row*sz+cell])
}
func (tsr *Int) SetFloatRowCell(row, cell int, val float64) {
	_, sz := tsr.RowCellSize()
	tsr.Values[row*sz+cell] = int(val)
}
func (tsr *Int) Floats(flt *[]float64) {
	SetFloat64SliceLen(flt, len(tsr.Values))
	for j, vl := range tsr.Values {
		(*flt)[j] = float64(vl)
	}
}
func (tsr *Int) SetFloats(vals []float64) {
	sz := ints.MinInt(len(tsr.Values), len(vals))
	for j := 0; j < sz; j++ {
		tsr.Values[j] = int(vals[j])
	}
}
func (tsr *Int) StringVal1D(off int) string { return kit.ToString(tsr.Values[off]) }
func (tsr *Int) SetString1D(off int, val string) {
	if fv, err := strconv.ParseFloat(val, 64); err == nil {
		tsr.Values[off] = int(fv)
	}
}
func (tsr *Int) StringValRowCell(row, cell int) string {
	_, sz := tsr.RowCellSize()
	return kit.ToString(tsr.Values[row*sz+cell])
}
func (tsr *Int) SetStringRowCell(row, cell int, val string) {
	if fv, err := strconv.ParseFloat(val, 64); err == nil {
		_, sz := tsr.RowCellSize()
		tsr.Values[row*sz+cell] = int(fv)
	}
}