Skip to content

Commit a937e2e

Browse files
deepnettsdeepnetts
authored andcommitted
Data set columns fix
1 parent 235e16a commit a937e2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/javax/visrec/ml/data/BasicDataSet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class BasicDataSet<E> implements DataSet<E> {
2121
/**
2222
* List of data set columns. Each column provides info about it's name, type.
2323
*/
24-
private List<Column> columns;
24+
private List<Column> columns = new ArrayList();
2525

2626
protected BasicDataSet() {
2727
items = new ArrayList<>();
@@ -62,7 +62,7 @@ public List<Column> getColumns() {
6262
}
6363

6464
public void setColumnNames(String[] columnNames) {
65-
for(int i=0; i<columns.size(); i++) {
65+
for(int i=0; i<columnNames.length; i++) {
6666
columns.get(i).setName(columnNames[i]);
6767
}
6868
}

0 commit comments

Comments
 (0)