Пример #1
0
        public static void RowPush <T>(Narray <T> table, Narray <T> data)
        {
            if (table.Length1d() == 0)
            {
                table.Copy(data);
                table.Reshape(1, table.Length());
                return;
            }
            CHECK_ARG(table.Dim(1) == data.Length(), "table.Dim(1) == data.Length()");
            table.Reserve(table.Length1d() + data.Length());
            table.SetDims(table.Dim(0) + 1, table.Dim(1), 0, 0);
            int irow = table.Dim(0) - 1;

            for (int k = 0; k < table.Dim(1); k++)
            {
                table[irow, k] = data.UnsafeAt1d(k);
            }
        }