MCPcopy Create free account
hub / github.com/cedrickchee/transformers-llama / nested_simplify

Function nested_simplify

src/transformers/testing_utils.py:1609–1637  ·  view source on GitHub ↗

Simplifies an object by rounding float numbers, and downcasting tensors/numpy arrays to get simple equality test within tests.

(obj, decimals=3)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Calls 3

is_torch_availableFunction · 0.85
is_tf_availableFunction · 0.85
itemsMethod · 0.45

Tested by

no test coverage detected