Format array values as strings matching the output format.
(arr, count=2)
| 106 | |
| 107 | |
| 108 | def _format_values(arr, count=2): |
| 109 | """Format array values as strings matching the output format.""" |
| 110 | return [ |
| 111 | np.format_float_positional(v, trim="-") if arr.dtype.kind == "f" else str(int(v)) |
| 112 | for v in arr.flat[:count] |
| 113 | ] |
| 114 | |
| 115 | |
| 116 | @params(*product(TENSOR_TEST_CASES, DEVICES)) |
no outgoing calls
no test coverage detected