Skip to content

Commit e2d086c

Browse files
committed
feat: add ndarrayStride to namespace
1 parent e391499 commit e2d086c

File tree

27 files changed

+41
-13
lines changed

27 files changed

+41
-13
lines changed

lib/node_modules/@stdlib/namespace/alias2pkg/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -2299,6 +2299,7 @@ ndarrayPromotionRules,"@stdlib/ndarray/promotion-rules"
22992299
ndarraySafeCasts,"@stdlib/ndarray/safe-casts"
23002300
ndarraySameKindCasts,"@stdlib/ndarray/same-kind-casts"
23012301
ndarrayShape,"@stdlib/ndarray/shape"
2302+
ndarrayStride,"@stdlib/ndarray/stride"
23022303
ndarrayStrides,"@stdlib/ndarray/strides"
23032304
ndempty,"@stdlib/ndarray/empty"
23042305
ndemptyLike,"@stdlib/ndarray/empty-like"

lib/node_modules/@stdlib/namespace/alias2pkg/data/data.json

+1-1
Large diffs are not rendered by default.

lib/node_modules/@stdlib/namespace/alias2related/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -2299,6 +2299,7 @@ ndarrayPromotionRules,"ndarrayCastingModes,ndarrayDataTypes,ndarraySafeCasts"
22992299
ndarraySafeCasts,"ndarrayCastingModes,ndarrayDataTypes,ndarraySameKindCasts"
23002300
ndarraySameKindCasts,"ndarrayCastingModes,ndarrayDataTypes,ndarraySafeCasts"
23012301
ndarrayShape,"array,ndarray,ndarrayOffset,ndarrayStrides"
2302+
ndarrayStride,"array,ndarray,ndarrayOffset,ndarrayOrder,ndarrayShape,ndarrayStrides"
23022303
ndarrayStrides,"array,ndarray,ndarrayOffset,ndarrayOrder,ndarrayShape"
23032304
ndempty,"ndemptyLike,ndzeros"
23042305
ndemptyLike,"ndempty,ndzerosLike"

lib/node_modules/@stdlib/namespace/alias2related/data/data.json

+1-1
Large diffs are not rendered by default.

lib/node_modules/@stdlib/namespace/alias2standalone/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -2299,6 +2299,7 @@ ndarrayPromotionRules,"@stdlib/ndarray-promotion-rules"
22992299
ndarraySafeCasts,"@stdlib/ndarray-safe-casts"
23002300
ndarraySameKindCasts,"@stdlib/ndarray-same-kind-casts"
23012301
ndarrayShape,"@stdlib/ndarray-shape"
2302+
ndarrayStride,"@stdlib/ndarray-stride"
23022303
ndarrayStrides,"@stdlib/ndarray-strides"
23032304
ndempty,"@stdlib/ndarray-empty"
23042305
ndemptyLike,"@stdlib/ndarray-empty-like"

lib/node_modules/@stdlib/namespace/alias2standalone/data/data.json

+1-1
Large diffs are not rendered by default.

lib/node_modules/@stdlib/namespace/aliases/data/data.json

+1-1
Large diffs are not rendered by default.

lib/node_modules/@stdlib/namespace/aliases/data/data.txt

+1
Original file line numberDiff line numberDiff line change
@@ -2299,6 +2299,7 @@ ndarrayPromotionRules
22992299
ndarraySafeCasts
23002300
ndarraySameKindCasts
23012301
ndarrayShape
2302+
ndarrayStride
23022303
ndarrayStrides
23032304
ndempty
23042305
ndemptyLike

lib/node_modules/@stdlib/namespace/lib/namespace/n.js

+15
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,21 @@ ns.push({
277277
]
278278
});
279279

280+
ns.push({
281+
'alias': 'ndarrayStride',
282+
'path': '@stdlib/ndarray/stride',
283+
'value': require( '@stdlib/ndarray/stride' ),
284+
'type': 'Function',
285+
'related': [
286+
'@stdlib/ndarray/array',
287+
'@stdlib/ndarray/ctor',
288+
'@stdlib/ndarray/offset',
289+
'@stdlib/ndarray/order',
290+
'@stdlib/ndarray/shape',
291+
'@stdlib/ndarray/strides'
292+
]
293+
});
294+
280295
ns.push({
281296
'alias': 'ndarrayStrides',
282297
'path': '@stdlib/ndarray/strides',

lib/node_modules/@stdlib/namespace/pkg2alias/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -2299,6 +2299,7 @@
22992299
"@stdlib/ndarray/safe-casts",ndarraySafeCasts
23002300
"@stdlib/ndarray/same-kind-casts",ndarraySameKindCasts
23012301
"@stdlib/ndarray/shape",ndarrayShape
2302+
"@stdlib/ndarray/stride",ndarrayStride
23022303
"@stdlib/ndarray/strides",ndarrayStrides
23032304
"@stdlib/ndarray/empty",ndempty
23042305
"@stdlib/ndarray/empty-like",ndemptyLike

lib/node_modules/@stdlib/namespace/pkg2alias/data/data.json

+1-1
Large diffs are not rendered by default.

lib/node_modules/@stdlib/namespace/pkg2related/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -2299,6 +2299,7 @@
22992299
"@stdlib/ndarray/safe-casts","@stdlib/ndarray/casting-modes,@stdlib/ndarray/dtypes,@stdlib/ndarray/same-kind-casts"
23002300
"@stdlib/ndarray/same-kind-casts","@stdlib/ndarray/casting-modes,@stdlib/ndarray/dtypes,@stdlib/ndarray/safe-casts"
23012301
"@stdlib/ndarray/shape","@stdlib/ndarray/array,@stdlib/ndarray/ctor,@stdlib/ndarray/offset,@stdlib/ndarray/strides"
2302+
"@stdlib/ndarray/stride","@stdlib/ndarray/array,@stdlib/ndarray/ctor,@stdlib/ndarray/offset,@stdlib/ndarray/order,@stdlib/ndarray/shape,@stdlib/ndarray/strides"
23022303
"@stdlib/ndarray/strides","@stdlib/ndarray/array,@stdlib/ndarray/ctor,@stdlib/ndarray/offset,@stdlib/ndarray/order,@stdlib/ndarray/shape"
23032304
"@stdlib/ndarray/empty","@stdlib/ndarray/empty-like,@stdlib/ndarray/zeros"
23042305
"@stdlib/ndarray/empty-like","@stdlib/ndarray/empty,@stdlib/ndarray/zeros-like"

lib/node_modules/@stdlib/namespace/pkg2related/data/data.json

+1-1
Large diffs are not rendered by default.

lib/node_modules/@stdlib/namespace/pkg2standalone/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -2299,6 +2299,7 @@
22992299
"@stdlib/ndarray/safe-casts","@stdlib/ndarray-safe-casts"
23002300
"@stdlib/ndarray/same-kind-casts","@stdlib/ndarray-same-kind-casts"
23012301
"@stdlib/ndarray/shape","@stdlib/ndarray-shape"
2302+
"@stdlib/ndarray/stride","@stdlib/ndarray-stride"
23022303
"@stdlib/ndarray/strides","@stdlib/ndarray-strides"
23032304
"@stdlib/ndarray/empty","@stdlib/ndarray-empty"
23042305
"@stdlib/ndarray/empty-like","@stdlib/ndarray-empty-like"

lib/node_modules/@stdlib/namespace/pkg2standalone/data/data.json

+1-1
Large diffs are not rendered by default.

lib/node_modules/@stdlib/namespace/standalone2pkg/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -2299,6 +2299,7 @@
22992299
"@stdlib/ndarray-safe-casts","@stdlib/ndarray/safe-casts"
23002300
"@stdlib/ndarray-same-kind-casts","@stdlib/ndarray/same-kind-casts"
23012301
"@stdlib/ndarray-shape","@stdlib/ndarray/shape"
2302+
"@stdlib/ndarray-stride","@stdlib/ndarray/stride"
23022303
"@stdlib/ndarray-strides","@stdlib/ndarray/strides"
23032304
"@stdlib/ndarray-empty","@stdlib/ndarray/empty"
23042305
"@stdlib/ndarray-empty-like","@stdlib/ndarray/empty-like"

lib/node_modules/@stdlib/namespace/standalone2pkg/data/data.json

+1-1
Large diffs are not rendered by default.

lib/node_modules/@stdlib/repl/code-blocks/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -3714,6 +3714,7 @@ ndsliceAssign,"var y = ndzeros( [ 2, 2 ] )\nvar x = scalar2ndarray( 3.0 )\nvar s
37143714
ndsliceDimension,"var x = array( [ [ 1, 2 ], [ 3, 4 ] ] )\nx.shape\nvar y = ndsliceDimension( x, 1, 1 )\ny.shape\nndarray2array( y )\n"
37153715
ndsliceDimensionFrom,"var x = array( [ [ 1, 2 ], [ 3, 4 ] ] )\nx.shape\nvar y = ndsliceDimensionFrom( x, 1, 1 )\ny.shape\nndarray2array( y )\n"
37163716
ndsliceDimensionTo,"var x = array( [ [ 1, 2 ], [ 3, 4 ] ] )\nx.shape\nvar y = ndsliceDimensionTo( x, 1, 1 )\ny.shape\nndarray2array( y )\n"
3717+
ndsliceTo,"var x = array( [ [ 1, 2 ], [ 3, 4 ] ] )\nx.shape\nvar y = ndsliceTo( x, 1, 1 )\ny.shape\nndarray2array( y )\n"
37173718
ndzeros,"var arr = ndzeros( [ 2, 2 ] )\nvar sh = arr.shape\nvar dt = arr.dtype\n"
37183719
ndzerosLike,"var x = base.ndzeros( 'float64', [ 2, 2 ], 'row-major' )\nvar sh = x.shape\nvar dt = x.dtype\nvar y = ndzerosLike( x )\nsh = y.shape\ndt = y.dtype\n"
37193720
nextGraphemeClusterBreak,"var out = nextGraphemeClusterBreak( 'last man standing', 4 )\nout = nextGraphemeClusterBreak( 'presidential election', 8 )\nout = nextGraphemeClusterBreak( 'अनुच्छेद', 1 )\nout = nextGraphemeClusterBreak( '🌷' )\n"

lib/node_modules/@stdlib/repl/code-blocks/data/data.json

+1-1
Large diffs are not rendered by default.

lib/node_modules/@stdlib/repl/help/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -3696,6 +3696,7 @@ ndarrayPromotionRules,"\nndarrayPromotionRules( [dtype1, dtype2] )\n Returns
36963696
ndarraySafeCasts,"\nndarraySafeCasts( [dtype] )\n Returns a list of ndarray data types to which a provided ndarray data type\n can be safely cast.\n\n If not provided an ndarray data type, the function returns a casting table.\n\n If provided an unrecognized ndarray data type, the function returns `null`.\n\n Parameters\n ----------\n dtype: any (optional)\n ndarray data type value.\n\n Returns\n -------\n out: Object|Array<string>|null\n ndarray data types to which a data type can be safely cast.\n\n Examples\n --------\n > var out = ndarraySafeCasts( 'float32' )\n <Array>\n\n See Also\n --------\n ndarrayCastingModes, ndarrayDataTypes, ndarraySameKindCasts\n"
36973697
ndarraySameKindCasts,"\nndarraySameKindCasts( [dtype] )\n Returns a list of ndarray data types to which a provided ndarray data type\n can be safely cast or cast within the same \"kind\".\n\n If not provided an ndarray data type, the function returns a casting table.\n\n If provided an unrecognized ndarray data type, the function returns `null`.\n\n Parameters\n ----------\n dtype: any (optional)\n ndarray data type value.\n\n Returns\n -------\n out: Object|Array<string>|null\n ndarray data types to which a data type can be safely cast or cast\n within the same \"kind\".\n\n Examples\n --------\n > var out = ndarraySameKindCasts( 'float32' )\n <Array>\n\n See Also\n --------\n ndarrayCastingModes, ndarrayDataTypes, ndarraySafeCasts\n"
36983698
ndarrayShape,"\nndarrayShape( x )\n Returns the shape of a provided ndarray.\n\n Parameters\n ----------\n x: ndarray\n Input ndarray.\n\n Returns\n -------\n out: Array<integer>\n Shape.\n\n Examples\n --------\n > var out = ndarrayShape( ndzeros( [ 3, 3, 3 ] ) )\n [ 3, 3, 3 ]\n\n See Also\n --------\n array, ndarray, ndarrayOffset, ndarrayStrides\n"
3699+
ndarrayStride,"\nndarrayStride( x, dim )\n Returns the stride along a specified dimension for a provided ndarray.\n\n A \"stride\" is the linear distance (i.e., number of elements) between\n adjacent elements along a specified dimension.\n\n Parameters\n ----------\n x: ndarray\n Input ndarray.\n\n dim: integer\n Dimension index. If less than zero, the index is resolved relative to\n the last dimension, with the last dimension corresponding to the value\n `-1`.\n\n Returns\n -------\n out: integer\n Stride.\n\n Examples\n --------\n > var out = ndarrayStride( ndzeros( [ 3, 3, 3 ] ), 0 )\n 9\n\n See Also\n --------\n array, ndarray, ndarrayOffset, ndarrayOrder, ndarrayShape, ndarrayStrides\n"
36993700
ndarrayStrides,"\nndarrayStrides( x )\n Returns the strides of a provided ndarray.\n\n Parameters\n ----------\n x: ndarray\n Input ndarray.\n\n Returns\n -------\n out: Array<integer>\n Strides.\n\n Examples\n --------\n > var out = ndarrayStrides( ndzeros( [ 3, 3, 3 ] ) )\n [ 9, 3, 1 ]\n\n See Also\n --------\n array, ndarray, ndarrayOffset, ndarrayOrder, ndarrayShape\n"
37003701
ndempty,"\nndempty( shape[, options] )\n Returns an uninitialized ndarray having a specified shape and data type.\n\n In browser environments, the function always returns zero-filled ndarrays.\n\n If `dtype` is 'generic', the function always returns a zero-filled ndarray.\n\n For returned ndarrays whose underlying memory is *not* initialized, memory\n contents are unknown and may contain *sensitive* data.\n\n Parameters\n ----------\n shape: ArrayLikeObject<integer>|integer\n Array shape.\n\n options: Object (optional)\n Options.\n\n options.dtype: string (optional)\n Underlying data type. Default: 'float64'.\n\n options.order: string (optional)\n Specifies whether an array is row-major (C-style) or column-major\n (Fortran-style). Default: 'row-major'.\n\n options.mode: string (optional)\n Specifies how to handle indices which exceed array dimensions. If equal\n to 'throw', an ndarray instance throws an error when an index exceeds\n array dimensions. If equal to 'normalize', an ndarray instance\n normalizes negative indices and throws an error when an index exceeds\n array dimensions. If equal to 'wrap', an ndarray instance wraps around\n indices exceeding array dimensions using modulo arithmetic. If equal to\n 'clamp', an ndarray instance sets an index exceeding array dimensions\n to either `0` (minimum index) or the maximum index. Default: 'throw'.\n\n options.submode: Array<string> (optional)\n Specifies how to handle subscripts which exceed array dimensions. If a\n mode for a corresponding dimension is equal to 'throw', an ndarray\n instance throws an error when a subscript exceeds array dimensions. If\n equal to 'normalize', an ndarray instance normalizes negative\n subscripts and throws an error when a subscript exceeds array\n dimensions. If equal to 'wrap', an ndarray instance wraps around\n subscripts exceeding array dimensions using modulo arithmetic. If equal\n to 'clamp', an ndarray instance sets a subscript exceeding array\n dimensions to either `0` (minimum index) or the maximum index. If the\n number of modes is fewer than the number of dimensions, the function\n recycles modes using modulo arithmetic. Default: [ options.mode ].\n\n Returns\n -------\n out: ndarray\n Output array.\n\n Examples\n --------\n > var arr = ndempty( [ 2, 2 ] )\n <ndarray>\n > var sh = arr.shape\n [ 2, 2 ]\n > var dt = arr.dtype\n 'float64'\n\n See Also\n --------\n ndemptyLike, ndzeros\n"
37013702
ndemptyLike,"\nndemptyLike( x[, options] )\n Returns an uninitialized ndarray having the same shape and data type as a\n provided input ndarray.\n\n The function infers the following attributes from the input array:\n\n - shape: array shape.\n - dtype: underlying array data type.\n - order: whether the array order is row-major (C-style) or column-major\n (Fortran-style).\n\n In browser environments, the function always returns zero-filled ndarrays.\n\n If `dtype` is 'generic', the function always returns a zero-filled ndarray.\n\n For returned ndarrays whose underlying memory is *not* initialized, memory\n contents are unknown and may contain *sensitive* data.\n\n Parameters\n ----------\n x: ndarray\n Input array.\n\n options: Object (optional)\n Options.\n\n options.shape: ArrayLikeObject<integer>|integer (optional)\n Array shape. Overrides the input array's inferred shape.\n\n options.dtype: string (optional)\n Array data type. Overrides the input array's inferred data type.\n\n options.order: string (optional)\n Array order (either 'row-major' (C-style) or 'column-major' (Fortran-\n style)). Overrides the input array's inferred order.\n\n options.mode: string (optional)\n Specifies how to handle indices which exceed array dimensions. If equal\n to 'throw', an ndarray instance throws an error when an index exceeds\n array dimensions. If equal to 'normalize', an ndarray instance\n normalizes negative indices and throws an error when an index exceeds\n array dimensions. If equal to 'wrap', an ndarray instance wraps around\n indices exceeding array dimensions using modulo arithmetic. If equal to\n 'clamp', an ndarray instance sets an index exceeding array dimensions\n to either `0` (minimum index) or the maximum index. Default: 'throw'.\n\n options.submode: Array<string> (optional)\n Specifies how to handle subscripts which exceed array dimensions. If a\n mode for a corresponding dimension is equal to 'throw', an ndarray\n instance throws an error when a subscript exceeds array dimensions. If\n equal to 'normalize', an ndarray instance normalizes negative\n subscripts and throws an error when a subscript exceeds array\n dimensions. If equal to 'wrap', an ndarray instance wraps around\n subscripts exceeding array dimensions using modulo arithmetic. If equal\n to 'clamp', an ndarray instance sets a subscript exceeding array\n dimensions to either `0` (minimum index) or the maximum index. If the\n number of modes is fewer than the number of dimensions, the function\n recycles modes using modulo arithmetic. Default: [ options.mode ].\n\n Returns\n -------\n out: ndarray\n Output array.\n\n Examples\n --------\n > var x = base.ndzeros( 'float64', [ 2, 2 ], 'row-major' )\n <ndarray>\n > var sh = x.shape\n [ 2, 2 ]\n > var dt = x.dtype\n 'float64'\n > var y = ndemptyLike( x )\n <ndarray>\n > sh = y.shape\n [ 2, 2 ]\n > dt = y.dtype\n 'float64'\n\n See Also\n --------\n ndempty, ndzerosLike\n"

lib/node_modules/@stdlib/repl/help/data/data.json

+1-1
Large diffs are not rendered by default.

lib/node_modules/@stdlib/repl/info/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -3714,6 +3714,7 @@ ndsliceAssign,"\nndsliceAssign( x:ndarray, y:ndarray, \n ...s:MultiSlice|Slice|
37143714
ndsliceDimension,"\nndsliceDimension( x:ndarray, dim:integer, slice:Slice|integer|null|undefined[, \n options:Object] )\n Returns a read-only view of an input ndarray when sliced along a specified\n dimension.\n"
37153715
ndsliceDimensionFrom,"\nndsliceDimensionFrom( x:ndarray, dim:integer, start:integer[, options:Object] )\n Returns a read-only shifted view of an input ndarray along a specified\n dimension.\n"
37163716
ndsliceDimensionTo,"\nndsliceDimensionTo( x:ndarray, dim:integer, stop:integer[, options:Object] )\n Returns a read-only truncated view of an input ndarray along a specified\n dimension.\n"
3717+
ndsliceTo,"\nndsliceTo( x:ndarray, ...stop:null|void|integer[, options:Object] )\n Returns a read-only truncated view of an input ndarray.\n"
37173718
ndzeros,"\nndzeros( shape:ArrayLikeObject<integer>|integer[, options:Object] )\n Returns a zero-filled ndarray having a specified shape and data type.\n"
37183719
ndzerosLike,"\nndzerosLike( x:ndarray[, options:Object] )\n Returns a zero-filled ndarray having the same shape and data type as a\n provided input ndarray.\n"
37193720
nextGraphemeClusterBreak,"\nnextGraphemeClusterBreak( str:string[, fromIndex:integer] )\n Returns the next extended grapheme cluster break in a string after a\n specified position.\n"

lib/node_modules/@stdlib/repl/info/data/data.json

+1-1
Large diffs are not rendered by default.

lib/node_modules/@stdlib/repl/signature/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -3751,6 +3751,7 @@ ndsliceAssign,"ndsliceAssign( x, y, ...s[, options] )"
37513751
ndsliceDimension,"ndsliceDimension( x, dim, slice[, options] )"
37523752
ndsliceDimensionFrom,"ndsliceDimensionFrom( x, dim, start[, options] )"
37533753
ndsliceDimensionTo,"ndsliceDimensionTo( x, dim, stop[, options] )"
3754+
ndsliceTo,"ndsliceTo( x, ...stop[, options] )"
37543755
ndzeros,"ndzeros( shape[, options] )"
37553756
ndzerosLike,"ndzerosLike( x[, options] )"
37563757
nextGraphemeClusterBreak,"nextGraphemeClusterBreak( str[, fromIndex] )"

lib/node_modules/@stdlib/repl/signature/data/data.json

+1-1
Large diffs are not rendered by default.

lib/node_modules/@stdlib/repl/typed-signature/data/data.csv

+1
Original file line numberDiff line numberDiff line change
@@ -3751,6 +3751,7 @@ ndsliceAssign,"ndsliceAssign( x:ndarray, y:ndarray, ...s:MultiSlice|Slice|null|u
37513751
ndsliceDimension,"ndsliceDimension( x:ndarray, dim:integer, slice:Slice|integer|null|undefined[, options:Object] )"
37523752
ndsliceDimensionFrom,"ndsliceDimensionFrom( x:ndarray, dim:integer, start:integer[, options:Object] )"
37533753
ndsliceDimensionTo,"ndsliceDimensionTo( x:ndarray, dim:integer, stop:integer[, options:Object] )"
3754+
ndsliceTo,"ndsliceTo( x:ndarray, ...stop:null|void|integer[, options:Object] )"
37543755
ndzeros,"ndzeros( shape:ArrayLikeObject<integer>|integer[, options:Object] )"
37553756
ndzerosLike,"ndzerosLike( x:ndarray[, options:Object] )"
37563757
nextGraphemeClusterBreak,"nextGraphemeClusterBreak( str:string[, fromIndex:integer] )"

lib/node_modules/@stdlib/repl/typed-signature/data/data.json

+1-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)