예제 #1
0
        public NDArray <T> arange(int start, int stop, int step = 1)
        {
            if (start > stop)
            {
                throw new Exception("parameters invalid");
            }

            switch (typeof(T).Name)
            {
            case "Int32":
            {
                var n = new NDArray <int>();
                n.ARange(stop, start, step);
                return(n as NDArray <T>);
            }

            case "Double":
            {
                var n = new NDArray <double>();
                n.ARange(stop, start, step);
                return(n as NDArray <T>);
            }

            default:
                throw new NotImplementedException();
            }
        }