feat(tensor): added ts.None

This commit is contained in:
sugarme 2020-08-05 10:31:01 +10:00
parent 79a0c2e6bf
commit 282c54f185

View File

@ -21,6 +21,11 @@ type Tensor struct {
ctensor lib.Ctensor
}
// None is an undefined tensor.
// It can be used in optional tensor parameter where 'None' value used.
// `ts.MustDefined()` function is used for checking 'null'
var None = NewTensor()
// NewTensor creates a new tensor
func NewTensor() Tensor {
ctensor := lib.AtNewTensor()