- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 337 for clip (0.2 sec)
-
src/internal/types/testdata/fixedbugs/issue60542.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package p func Clip[S ~[]E, E any](s S) S { return s } var versions func()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 24 21:28:05 UTC 2024 - 331 bytes - Viewed (0) -
src/slices/example_test.go
// Output: // 4 // [0 42 -10 8] // 4 // 8 } func ExampleClip() { a := [...]int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9} s := a[:4:10] clip := slices.Clip(s) fmt.Println(cap(s)) fmt.Println(clip) fmt.Println(len(clip)) fmt.Println(cap(clip)) // Output: // 10 // [0 1 2 3] // 4 // 4 } func ExampleConcat() { s1 := []int{0, 1, 2, 3} s2 := []int{4, 5, 6}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 10 17:28:50 UTC 2024 - 8.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/utils/math_utils.cc
return failure(); } const double fraction = std::frexp(double_multiplier, &shift); quantized_fraction = static_cast<int32_t>(std::round(fraction * (1L << 15))); // Clip extreme values. These are more than enough to overflow int8, the // storage type for quantized values, and the final values will be clamped // no matter what. if (quantized_fraction == (1L << 15)) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 05 08:32:43 UTC 2024 - 2.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unusedresult/unusedresult.go
"context.WithTimeout": true, "context.WithValue": true, "errors.New": true, "fmt.Errorf": true, "fmt.Sprint": true, "fmt.Sprintf": true, "slices.Clip": true, "slices.Compact": true, "slices.CompactFunc": true, "slices.Delete": true, "slices.DeleteFunc": true, "slices.Grow": true, "slices.Insert": true,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 22 19:00:13 UTC 2024 - 4.5K bytes - Viewed (0) -
src/slices/slices.go
if n < 0 { panic("cannot be negative") } if n -= cap(s) - len(s); n > 0 { s = append(s[:cap(s)], make([]E, n)...)[:len(s)] } return s } // Clip removes unused capacity from the slice, returning s[:len(s):len(s)]. func Clip[S ~[]E, E any](s S) S { return s[:len(s):len(s)] } // TODO: There are other rotate algorithms.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 29 14:01:59 UTC 2024 - 13.6K bytes - Viewed (0) -
src/image/draw/draw.go
clip(dst, &r, src, &sp, nil, nil) if r.Empty() { return } drawPaletted(dst, r, src, sp, true) } // clip clips r against each image's bounds (after translating into the // destination image's coordinate space) and shifts the points sp and mp by // the same amount as the change in r.Min.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 11 17:08:05 UTC 2024 - 33.9K bytes - Viewed (0) -
src/slices/slices_test.go
t.Errorf("len(%v) = %d, want 3", s1, len(s1)) } if cap(s1) < 6 { t.Errorf("cap(%v[:3]) = %d, want >= 6", orig, cap(s1)) } s2 := Clip(s1) if !Equal(s1, s2) { t.Errorf("Clip(%v) = %v, want %v", s1, s2, s1) } if cap(s2) != 3 { t.Errorf("cap(Clip(%v)) = %d, want 3", orig, cap(s2)) } } func TestReverse(t *testing.T) { even := []int{3, 1, 4, 1, 5, 9} // len = 6 Reverse(even)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 13:32:06 UTC 2024 - 33.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_algorithm.py
# is unusually small. if abs(zero_point) > 9e9: zero_point = 9e9 if abs(scale) < 1e-9: scale = 1e-9 zero_point = round(zero_point) quantized_hist_mids = np.clip( np.round(self._hist_mids / scale) + zero_point, minbound, maxbound ) dequantized_hist_mids = scale * (quantized_hist_mids - zero_point) return dequantized_hist_mids
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Mar 11 19:29:56 UTC 2024 - 14.7K bytes - Viewed (0) -
src/cmd/go/main.go
telemetry.Inc("go/subcommand:" + strings.ReplaceAll(cfg.CmdName, " ", "-") + "-" + strings.Join(args[used:], "-")) help.Help(os.Stdout, append(slices.Clip(args[:used]), args[used+1:]...)) base.Exit() } helpArg := "" if used > 0 { helpArg += " " + strings.Join(args[:used], " ") } cmdName := cfg.CmdName if cmdName == "" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:09:11 UTC 2024 - 10K bytes - Viewed (0) -
samples/bookinfo/src/productpage/templates/productpage.html
</svg> {% endfor %} {% for n in range(5 - review.rating.stars) %}
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jun 03 19:54:05 UTC 2024 - 10.9K bytes - Viewed (0)