-
Notifications
You must be signed in to change notification settings - Fork 128
Open
Description
Hello!
Somehow Copy function cannot deepcopy an array of list of list.
A example test is following.
package deepcopytest
import (
"testing"
"github.com/mohae/deepcopy"
)
type a [3][][]float64
var source = a{
{
{
1.0,
2.0,
3.0,
},
},
}
func TestDeepcopy(t *testing.T) {
distination := deepcopy.Copy(source).(a)
source[0][0][0] = 4.0
source[0][0][1] = 5.0
source[0][0][2] = 6.0
if distination[0][0][0] == source[0][0][0] {
t.Fatal("Isn't deepcopied!", distination, source)
}
}
Please make it can deepcopy.
Thank you.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels