feat(wrapper/tensor): added godoc to method

This commit is contained in:
sugarme 2020-06-08 14:37:37 +10:00
parent 67fd311ed2
commit af9c1aaeb1

View File

@ -550,6 +550,10 @@ func (ts Tensor) CopyData(dst interface{}, numel uint) (err error) {
return nil
}
// MustCopyData copies number of elements from tensor to a slice of data
//
// NOTE: `dst` is a slice with length = numel and Go type equavalent to tensor
// DType
func (ts Tensor) MustCopyData(dst interface{}, numel uint) {
err := ts.CopyData(dst, numel)
if err != nil {