MCPcopy
hub / github.com/huggingface/transformers.js / round_

Method round_

packages/transformers/src/utils/tensor.js:758–764  ·  view source on GitHub ↗

* In-place version of @see Tensor.round

()

Source from the content-addressed store, hash-verified

756 * In-place version of @see {@link Tensor.round}
757 */
758 round_() {
759 const this_data = this.data;
760 for (let i = 0; i < this_data.length; ++i) {
761 this_data[i] = Math.round(this_data[i]);
762 }
763 return this;
764 }
765
766 /**
767 * Rounds elements of input to the nearest integer.

Callers 2

roundMethod · 0.80
_callMethod · 0.80

Calls 1

roundMethod · 0.80

Tested by

no test coverage detected