Exemple #1
0
        public void Arange_IntTypeStopArgOnly_ReturnIntegerTypeNdArray()
        {
            // arrange & action
            var array = NumCs.Arange(10);

            // assert
            Assert.IsInstanceOfType(array, typeof(NdArray <int>));
        }
Exemple #2
0
        public void Ones_IntTypeVector_ReturnIntegerTypeNdArray()
        {
            // arrange & action
            var array = NumCs.Ones <int>(new[] { 2, 3, 4, 5 });

            // assert
            Assert.IsInstanceOfType(array, typeof(NdArray <int>));
        }
Exemple #3
0
        public void Arange_IntTypeFullArgs_ReturnIntegerTypeNdArray()
        {
            // arrange & action
            var array = NumCs.Arange(0, 10, 1);

            // assert
            Assert.IsInstanceOfType(array, typeof(NdArray <int>));
        }
Exemple #4
0
        public void Arange_IntOneElement_ReturnIntegerTypeNdArray()
        {
            // arrange & action
            var array = NumCs.Arange(1);

            // assert
            Assert.IsInstanceOfType(array, typeof(NdArray <int>));
        }
Exemple #5
0
        public void Zeros_DoubleTypeVector_ReturnDoubleTypeNdArray()
        {
            // arrange & action
            var array = NumCs.Zeros <double>(new[] { 2, 3, 4, 5 });

            // assert
            Assert.IsInstanceOfType(array, typeof(NdArray <double>));
        }
Exemple #6
0
        public void Arange_DoubleTypeStopArgOnly_ReturnDoubleTypeNdArray()
        {
            // arrange & action
            var array = NumCs.Arange(10.0);

            // assert
            Assert.IsInstanceOfType(array, typeof(NdArray <double>));
        }
Exemple #7
0
        public void Arange_DoubleTypeFullArgs_ReturnDoubleTypeNdArray()
        {
            // arrange & action
            var array = NumCs.Arange(0.0, 10.0, 1.0);

            // assert
            Assert.IsInstanceOfType(array, typeof(NdArray <double>));
        }
Exemple #8
0
        public void OnesLike_DoubleTypeVector_ReturnDoubleTypeNdArray()
        {
            // arrange
            var template = NumCs.Ones <double>(new[] { 2, 3, 4, 5 });

            // action
            var array = NumCs.OnesLike(template);

            // assert
            Assert.IsInstanceOfType(array, typeof(NdArray <double>));
        }
Exemple #9
0
        public void ZerosLike_IntTypeVector_ReturnIntegerTypeNdArray()
        {
            // arrange
            var template = NumCs.Zeros <int>(new[] { 2, 3, 4, 5 });

            // action
            var array = NumCs.ZerosLike(template);

            // assert
            Assert.IsInstanceOfType(array, typeof(NdArray <int>));
        }