Skip to content

Commit 5a06940

Browse files
Planeshifterkgryte
andauthored
docs: fix typos and examples
PR-URL: #11761 Co-authored-by: Athan Reines <kgryte@gmail.com> Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent 3ca7c21 commit 5a06940

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

docs/migration-guides/numpy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ limitations under the License.
4848
| Filter an array according to a predicate function | `x[np.vectorize(predicate)(x)]` | [`filter(x, predicate)`][@stdlib/ndarray/filter] |
4949
| Find the index of the first element which equals a specified value | `np.argmax(x == v, axis=dim)` | [`indexOf(x, v, {dim: dim})`][@stdlib/blas/ext/index-of] |
5050
| Find the index of the last element which equals a specified value | `x.shape[dim]-1-np.argmax(np.flip(x, axis=dim) == v, axis=dim)` | [`lastIndexOf(x, v, {dim: dim})`][@stdlib/blas/ext/last-index-of] |
51-
| Flatten an array to a desired depth | `np.reshape(x, newshape)`] | [`flatten(x, {depth: depth})`][@stdlib/ndarray/flatten] |
51+
| Flatten an array to a desired depth | `np.reshape(x, newshape)` | [`flatten(x, {depth: depth})`][@stdlib/ndarray/flatten] |
5252
| Flatten an array starting from a specific dimension | `np.reshape(x, x.shape[:dim] + (-1,))` | [`flattenFrom(x, dim)`][@stdlib/ndarray/flatten-from] |
5353
| Prepend a specified number of singleton dimensions | `np.reshape(x, (1,)*n + x.shape)` | [`prependSingletonDimensions(x, n)`][@stdlib/ndarray/prepend-singleton-dimensions] |
5454
| Prepend a zero-filled array of the same shape along a specified dimension | `np.concat((np.zeros_like(x), x), axis=dim)` | [`concat([zerosLike(x), x], {dim: dim})`][@stdlib/ndarray/concat] |

lib/node_modules/@stdlib/blas/base/ndarray/docs/types/index.d.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,10 @@ interface Namespace {
173173
* @returns second input ndarray
174174
*
175175
* @example
176-
* var Float64Array = require( '@stdlib/array/float64' );
177-
* var ndarray = require( '@stdlib/ndarray/base/ctor' );
178-
*
179-
* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
180-
* var x = new ndarray( 'float64', xbuf, [ 5 ], [ 1 ], 0, 'row-major' );
176+
* var Float64Vector = require( '@stdlib/ndarray/vector/float64' );
181177
*
182-
* var ybuf = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );
183-
* var y = new ndarray( 'float64', ybuf, [ 5 ], [ 1 ], 0, 'row-major' );
178+
* var x = new Float64Vector( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
179+
* var y = new Float64Vector( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );
184180
*
185181
* var z = ns.dswap( [ x, y ] );
186182
* // x => <ndarray>[ 6.0, 7.0, 8.0, 9.0, 10.0 ]

lib/node_modules/@stdlib/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ declare module '@stdlib/types/array' {
670670
* @example
671671
* const buf = new Float16Array( 8 );
672672
*
673-
* const z: Complex64Array = {
673+
* const z: Complex32Array = {
674674
* 'byteLength': 16,
675675
* 'byteOffset': 0,
676676
* 'BYTES_PER_ELEMENT': 2,

0 commit comments

Comments
 (0)