Accord.Tests.Math.MatrixTest.FromTableToArrayTest C# (CSharp) Method

FromTableToArrayTest() private method

private FromTableToArrayTest ( ) : void
return void
        public void FromTableToArrayTest()
        {
            DataTable table = new DataTable();
            table.Columns.Add("A", typeof(bool));
            table.Columns.Add("B", typeof(string));
            table.Rows.Add(true, "1.0");
            table.Rows.Add(true, "0");
            table.Rows.Add(false, "1");
            table.Rows.Add(false, "0.0");

            double[][] actual = table.ToArray(System.Globalization.CultureInfo.InvariantCulture);
            double[][] expected =
            {
                new double[] { 1, 1 },
                new double[] { 1, 0 },
                new double[] { 0, 1 },
                new double[] { 0, 0 },
            };

            Assert.IsTrue(expected.IsEqual(actual));
        }
MatrixTest