()
| 289 | } |
| 290 | |
| 291 | func (tg *TensorGrid) UpdateRange() { |
| 292 | if !tg.Display.Range.FixMin || !tg.Display.Range.FixMax { |
| 293 | min, max, _, _ := tg.Tensor.Range() |
| 294 | if !tg.Display.Range.FixMin { |
| 295 | nmin := minmax.NiceRoundNumber(min, true) // true = below # |
| 296 | tg.Display.Range.Min = nmin |
| 297 | } |
| 298 | if !tg.Display.Range.FixMax { |
| 299 | nmax := minmax.NiceRoundNumber(max, false) // false = above # |
| 300 | tg.Display.Range.Max = nmax |
| 301 | } |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | func (tg *TensorGrid) Render() { |
| 306 | if tg.Tensor == nil || tg.Tensor.Len() == 0 { |
no test coverage detected