예제 #1
0
        public void Replicate_NegativeRepeats_ThrowException()
        {
            // arrange
            var input = NdArray <int> .Arange(HostDevice.Instance, 0, 2 * 3, 1).Reshape(new[] { 2, 3 });

            // action
            var result = NdArrayOperator <int> .Replicate(0, -10, input);
        }
예제 #2
0
        public void Replicate()
        {
            // arrange
            var input = NdArray <int> .Arange(HostDevice.Instance, 0, 2 * 3, 1).Reshape(new[] { 2, 3 });

            // action
            var result = NdArrayOperator <int> .Replicate(0, 10, input);

            // assert
            CollectionAssert.AreEqual(new[] { 20, 3 }, result.Shape);
        }