Skip to content

Commit cacb2d2

Browse files
Merge pull request #323 from NinaM31/NinaM31
add `set_printoptions` for numpy & torch print
2 parents f2aa274 + 9a0b764 commit cacb2d2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

intro-to-pytorch/Part 1 - Tensors in PyTorch (Exercises).ipynb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@
270270
"outputs": [],
271271
"source": [
272272
"import numpy as np\n",
273+
"np.set_printoptions(precision=8)\n",
273274
"a = np.random.rand(4,3)\n",
274275
"a"
275276
]
@@ -280,6 +281,7 @@
280281
"metadata": {},
281282
"outputs": [],
282283
"source": [
284+
"torch.set_printoptions(precision=8)\n",
283285
"b = torch.from_numpy(a)\n",
284286
"b"
285287
]

0 commit comments

Comments
 (0)