Пример #1
0
        public void TestFromColumns()
        {
            var a = new float[] { 10, 20, 30 };
            var b = new float[] { 40, 50, 60, 70 };

            var result = DataSourceFactory.FromColumns(new float[][] { a, b });

            Assert.AreEqual(2, result.Shape.Rank);
            Assert.AreEqual(4, result.Shape.Dimensions[0]);
            Assert.AreEqual(2, result.Shape.Dimensions[1]);

            Assert.AreEqual(0.0, result[3, 0]);
            Assert.AreEqual(60.0, result[2, 1]);
        }