Skip to content

Commit fabf202

Browse files
committed
docs: fix typos in NumPy migration guide
- Corrects `np.count_nonzeros` to `np.count_nonzero` (the actual NumPy API name; already spelled correctly elsewhere in the same table). - Removes a duplicated article in "Prepend a a specified number of singleton dimensions". Ref: 1be7bcc
1 parent de0de26 commit fabf202

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/migration-guides/numpy/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ limitations under the License.
3535
| Broadcast a scalar to a specified shape | `np.broadcast_to(np.array(scalar), shape)` | [`broadcastScalar(scalar, shape)`][@stdlib/ndarray/broadcast-scalar] |
3636
| Copy an array | `np.copy(x)` | [`copy(x)`][@stdlib/ndarray/copy] |
3737
| Count the number of falsy values in an array | `x.size-np.count_nonzero(x)` | [`countFalsy(x)`][@stdlib/ndarray/count-falsy] |
38-
| Count the number of truthy values in an array | `np.count_nonzeros(x)` | [`countTruthy(x)`][@stdlib/ndarray/count-truthy] |
38+
| Count the number of truthy values in an array | `np.count_nonzero(x)` | [`countTruthy(x)`][@stdlib/ndarray/count-truthy] |
3939
| Test whether an array includes a specific value | `np.any(np.equal(x,v))` | [`includes(x,v)`][@stdlib/ndarray/includes] |
4040
| Reverse the elements along a dimension | `np.flip(x, axis=dim)` | [`reverseDimension(x, dim)`][@stdlib/ndarray/reverse-dimension] |
41-
| Prepend a a specified number of singleton dimensions | `np.reshape(x, (1,)*n + x.shape)` | [`prependSingletonDimensions(x, n)`][@stdlib/ndarray/prepend-singleton-dimensions] |
41+
| Prepend a specified number of singleton dimensions | `np.reshape(x, (1,)*n + x.shape)` | [`prependSingletonDimensions(x, n)`][@stdlib/ndarray/prepend-singleton-dimensions] |
4242
| Test whether an array contains at least `n` truthy values | `np.count_nonzero(x) >= n` | [`some(x, n)`][@stdlib/ndarray/some] |
4343

4444
<!-- lint enable table-pipe-alignment -->

0 commit comments

Comments
 (0)