Skip to content

Commit 1073979

Browse files
authored
doc: Fix diag() example to make is less confusing. (#7113)
Fixed an example which I found confusing because there's a 6 in the left column (at position [3][0][3][0]), until I noticed the typo, where the 6 is repeated instead of a 7.
1 parent 7cf8aa4 commit 1073979

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tfjs-core/src/ops/diag.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import {op} from './operation';
3838
* tf.diag(x).print()
3939
* ```
4040
* ```js
41-
* const x = tf.tensor2d([1, 2, 3, 4, 5, 6, 6, 8], [4, 2])
41+
* const x = tf.tensor2d([1, 2, 3, 4, 5, 6, 7, 8], [4, 2])
4242
*
4343
* tf.diag(x).print()
4444
* ```

0 commit comments

Comments
 (0)