Skip to content

Commit

Permalink
Not exporting the variable that stores local path of the package
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasanthakumar V authored and Vasanthakumar V committed Dec 10, 2019
1 parent e247ef6 commit 67914ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions datasets/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ import (
)

var (
// Dir stores the resolved import path of github.com/pa-m/sklearn
Dir string
// dir stores the resolved local path of github.com/pa-m/sklearn
dir string
)

func init() {
pkg, err := build.Import("github.com/pa-m/sklearn", ".", build.FindOnly)
if err != nil {
panic(err)
}
Dir = pkg.Dir
dir = pkg.Dir
}

// MLDataset structure returned by LoadIris,LoadBreastCancer,LoadDiabetes,LoadBoston
Expand Down Expand Up @@ -100,7 +100,7 @@ func (ds *MLDataset) GetXY() (X, Y *mat.Dense) {
}

func localPath(s string) string {
p := strings.Split(Dir, string(filepath.ListSeparator))[0]
p := strings.Split(dir, string(filepath.ListSeparator))[0]
return filepath.Join(p, s)
}

Expand Down

0 comments on commit 67914ce

Please sign in to comment.