-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNeuralData.cs
More file actions
36 lines (32 loc) · 814 Bytes
/
Copy pathNeuralData.cs
File metadata and controls
36 lines (32 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SlothNet
{
class NeuralData
{
public double[][] Data;
public int Row = 0;
public NeuralData(int rows)
{
Data = new double[rows][];
}
public void Add(DataTable dataTable)
{
List<double> data = new List<double>();
for(int i = 0; i < dataTable.Rows.Count; i++)
{
DataRow dr = dataTable.Rows[i];
foreach (double item in dr.ItemArray)
{
data.Add(item);
}
Data[i] = data.ToArray();
data.Clear();
}
}
}
}