diff --git a/annotator_test.go b/annotator_test.go index 3dfe7c4..f2f97e0 100644 --- a/annotator_test.go +++ b/annotator_test.go @@ -41,7 +41,7 @@ func TestAnnotator(t *testing.T) { } } - dMatrix, err := treelite.CreaetFromMat(feature, nRow, nCol, float32(math.NaN())) + dMatrix, err := treelite.CreateFromMat(feature, nRow, nCol, float32(math.NaN())) if err != nil { t.Fatal(err) } diff --git a/dmatrix.go b/dmatrix.go index 795ca54..e126a70 100644 --- a/dmatrix.go +++ b/dmatrix.go @@ -24,8 +24,8 @@ type DMatrix struct { element int } -// CreaetFromMat creates a dense DMatrix from the given data -func CreaetFromMat( +// CreateFromMat creates a dense DMatrix from the given data +func CreateFromMat( data []float32, nrow, ncol int, missing float32, diff --git a/dmatrix_test.go b/dmatrix_test.go index ce30e6d..f72c394 100644 --- a/dmatrix_test.go +++ b/dmatrix_test.go @@ -14,7 +14,7 @@ func TestDMatrix_CreaetFromMat(t *testing.T) { ncol := 3 nonZero := 6 - target, err := treelite.CreaetFromMat(data, nrow, ncol, float32(math.NaN())) + target, err := treelite.CreateFromMat(data, nrow, ncol, float32(math.NaN())) if err != nil { t.Fatal(err) } diff --git a/example_test.go b/example_test.go index b3e86f5..301efa0 100644 --- a/example_test.go +++ b/example_test.go @@ -17,7 +17,7 @@ import ( func Example() { data, nRow, nCol := loadData() - dMatrix, err := treelite.CreaetFromMat(data, nRow, nCol, float32(math.NaN())) + dMatrix, err := treelite.CreateFromMat(data, nRow, nCol, float32(math.NaN())) if err != nil { log.Fatal(err) } diff --git a/predictor_test.go b/predictor_test.go index dfa9eb8..c3e3297 100644 --- a/predictor_test.go +++ b/predictor_test.go @@ -66,7 +66,7 @@ func TestPredictor_PredictBatch(t *testing.T) { } } - dMatrix, err := treelite.CreaetFromMat(feature, nRow, nCol, float32(math.NaN())) + dMatrix, err := treelite.CreateFromMat(feature, nRow, nCol, float32(math.NaN())) if err != nil { t.Fatal(err) }