mirror of
https://github.com/ollama/ollama
synced 2026-05-01 20:55:48 +00:00
Slice used cmp.Or to resolve a zero stop value to the dimension size, intended to support open-ended slices like a[i:]. This made Slice(0, 0) indistinguishable from Slice(), so any slice with a zero stop would silently include the entire dimension instead of being empty. Replace cmp.Or with an explicit End sentinel and resolve negative indices against the dimension size, matching Python/PyTorch semantics. |
||
|---|---|---|
| .. | ||
| sample.go | ||
| sample_test.go | ||