Skip to content

Commit

Permalink
Fix code snippet in docs where indices should be int32 (tensorflow#989)
Browse files Browse the repository at this point in the history
DOC
  • Loading branch information
nbardy authored and dsmilkov committed May 3, 2018
1 parent c6a6950 commit 52cc2f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ops/array_ops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -867,14 +867,14 @@ export class ArrayOps {
*
* ```js
* const x = tf.tensor1d([1, 2, 3, 4]);
* const indices = tf.tensor1d([1, 3, 3]);
* const indices = tf.tensor1d([1, 3, 3], 'int32');
*
* x.gather(indices).print();
* ```
*
* ```js
* const x = tf.tensor2d([1, 2, 3, 4], [2, 2]);
* const indices = tf.tensor1d([1, 1, 0]);
* const indices = tf.tensor1d([1, 1, 0], 'int32');
*
* x.gather(indices).print();
* ```
Expand Down

0 comments on commit 52cc2f6

Please sign in to comment.