IsFullySpecified returns true iff the size of all the dimensions of s are known.
()
| 68 | // IsFullySpecified returns true iff the size of all the dimensions of s are |
| 69 | // known. |
| 70 | func (s Shape) IsFullySpecified() bool { |
| 71 | if s.dims == nil { |
| 72 | return false |
| 73 | } |
| 74 | for _, size := range s.dims { |
| 75 | if size <= 1 { |
| 76 | return false |
| 77 | } |
| 78 | } |
| 79 | return true |
| 80 | } |
| 81 | |
| 82 | // ToSlice returns the (possibly partially known) shape represented by s as a |
| 83 | // slice, or an error if the number of dimensions is not known. |
no outgoing calls