mirror of
https://github.com/sjwhitworth/golearn.git
synced 2025-04-26 13:49:14 +08:00
Omit unused second value from range statements.
This commit is contained in:
parent
fbc7df8c2c
commit
daac7a278d
@ -153,7 +153,7 @@ func (b *BaggedModel) Predict(from *base.Instances) *base.Instances {
|
||||
}
|
||||
|
||||
// Send all the models to the workers for prediction
|
||||
for i, _ := range b.Models {
|
||||
for i := range b.Models {
|
||||
processpipe <- i
|
||||
}
|
||||
close(processpipe) // Finished sending models to be predicted
|
||||
|
@ -32,7 +32,7 @@ func SortIntMap(m map[int]float64) []int {
|
||||
sm.m = m
|
||||
sm.s = make([]int, len(m))
|
||||
i := 0
|
||||
for key, _ := range m {
|
||||
for key := range m {
|
||||
sm.s[i] = key
|
||||
i++
|
||||
}
|
||||
@ -62,7 +62,7 @@ func SortStringMap(m map[string]int) []string {
|
||||
sm.m = m
|
||||
sm.s = make([]string, len(m))
|
||||
i := 0
|
||||
for key, _ := range m {
|
||||
for key := range m {
|
||||
sm.s[i] = key
|
||||
i++
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user