File tree Expand file tree Collapse file tree 3 files changed +4
-14
lines changed
Expand file tree Collapse file tree 3 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ def set_printoptions(
2626 sci_mode = None ,
2727):
2828 r"""Set options for printing.
29-
3029 Args:
3130 precision: Number of digits of precision for floating point output (default = 4).
3231 threshold: Total number of array elements which trigger summarization rather than full `repr` (default = 1000).
@@ -41,7 +40,6 @@ def set_printoptions(
4140 >>> torch.set_printoptions(precision=2)
4241 >>> torch.tensor([1.12345])
4342 tensor([1.12])
44-
4543 """
4644 if profile is not None :
4745 if profile == "default" :
Original file line number Diff line number Diff line change @@ -311,13 +311,6 @@ TestResult TensorDestructorTest::testPrintOptions() {
311311
312312 std::cout << " \n === Testing Print Options for Different Data Types ===" << std::endl;
313313
314- // Reset to defaults before each test
315- set_precision (-1 );
316- set_line_width (80 );
317- set_threshold (1000 );
318- set_edge_items (3 );
319- set_sci_mode (-1 );
320-
321314 // Process each test case
322315 for (const auto &test_case : case_list) {
323316 // Extract tuple elements
@@ -327,11 +320,6 @@ TestResult TensorDestructorTest::testPrintOptions() {
327320 std::cout << tensor << std::endl;
328321 }
329322
330- // Test print options with F32 tensor
331- set_precision (-1 );
332- set_line_width (80 );
333- set_threshold (1000 );
334- set_edge_items (3 );
335323 set_sci_mode (-1 );
336324 std::cout << " \n === Testing Print Options with F32 Tensor ===" << std::endl;
337325 {
Original file line number Diff line number Diff line change 55#include < cmath>
66#include < cstdint>
77#include < iomanip>
8+ #include < ios>
89#include < iostream>
10+ #include < ostream>
11+ #include < sstream>
12+ #include < string>
913#include < vector>
1014
1115namespace {
You can’t perform that action at this time.
0 commit comments