Create a Test without CSV
jonathanhecl opened this issue · 1 comments
jonathanhecl commented
I'm trying to create a Test instance without CSV but I don't understand some functions in base.
My structure is like:
1,0,out
"out" dont matter for now, I only want to create the initial 1,0 .
Already I do this:
testData := base.NewStructuralCopy(trainData) // I need use the original structure
testData.Extend(1) // Only one item test (this create "0,0,default")
spec := base.ResolveAttributes(testData, testData.AllClassAttributes())[0] // Work
testData.Set(spec, 1, []byte{1}) // Dont Work
spec1 := base.ResolveAttributes(testData, testData.AllClassAttributes())[1]
testData.Set(spec1, 1, []byte{0})
The error is: "panic: Tried to call set() with 1 bytes, should be 8"
Thank you
Sentimentron commented
It might be because you're on a 64-bit platform and need 8 bytes to make an integer? Try
testData.Set(spec, 1, []byte{0, 0, 0, 0, 0, 0, 0, 1})
and see if you get something different?