예제 #1
0
        public NArray <T> Index <T>(NArray <T> operand, NArrayInt indices)
        {
            var result = NewNArrayLike <T, int>(indices);

            Provider(operand).Index <T>(operand, indices, result);
            return(result);
        }
        public NArray <T> Index <T>(NArray <T> operand, NArrayInt indices)
        {
            if (_builder.VectorLength == -1)
            {
                _builder.VectorLength = indices.Length;
            }
            if (indices.Length != _builder.VectorLength)
            {
                throw new ArgumentException("length mismatch", "array");
            }

            return(NewNArrayLike <T>(operand));
        }