You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* var Slice = require( '@stdlib/ns.fancySlice-ctor' );
1468
+
*
1469
+
* var x = [ 1, 2, 3, 4, 5, 6 ];
1470
+
*
1471
+
* var out = ns.fancySlice( x, new Slice( null, null, -1 ), false );
1472
+
* // returns [ 6, 5, 4, 3, 2, 1 ]
1473
+
*/
1474
+
fancySlice: typeoffancySlice;
1475
+
1476
+
/**
1477
+
* Assigns element values from a broadcasted input array to corresponding elements in an output array.
1478
+
*
1479
+
* ## Notes
1480
+
*
1481
+
* - The input array must be broadcast compatible with the output array slice to which elements will be assigned (i.e., contain only one element or the same number of elements as in the slice).
1482
+
* - The input array must have a data type which can be safely cast to the output array data type. Floating-point data types (both real and complex) are allowed to downcast to a lower precision data type of the same kind (e.g., element values from a `'float64'` input array can be assigned to corresponding elements in a `'float32'` output array).
* Applies a binary callback to elements in two two-dimensional nested input arrays according to elements in a two-dimensional nested mask array and assigns results to elements in a two-dimensional nested output array.
2567
2684
*
@@ -2609,6 +2726,21 @@ interface Namespace {
2609
2726
*/
2610
2727
mskfilter: typeofmskfilter;
2611
2728
2729
+
/**
2730
+
* Returns a new array by applying a mask to a provided input array.
2731
+
*
2732
+
* @param x - input array
2733
+
* @param mask - mask array
2734
+
* @returns output array
2735
+
*
2736
+
* @example
2737
+
* var x = [ 1, 2, 3, 4 ];
2738
+
*
2739
+
* var y = ns.mskreject( x, [ 0, 1, 0, 1 ] );
2740
+
* // returns [ 1, 3 ]
2741
+
*/
2742
+
mskreject: typeofmskreject;
2743
+
2612
2744
/**
2613
2745
* Applies a unary callback to elements in a two-dimensional nested input array according to elements in a two-dimensional nested mask array and assigns results to elements in a two-dimensional nested output array.
2614
2746
*
@@ -3115,6 +3247,22 @@ interface Namespace {
3115
3247
*/
3116
3248
quinary5d: typeofquinary5d;
3117
3249
3250
+
/**
3251
+
* Returns a shallow copy of an array containing only those elements which fail a test implemented by a predicate function.
3252
+
*
3253
+
* @param x - input array
3254
+
* @param predicate - predicate function
3255
+
* @param thisArg - predicate function execution context
3256
+
* @returns output array
3257
+
*
3258
+
* @example
3259
+
* var x = [ 1, -2, -3, 4 ];
3260
+
*
3261
+
* var out = ns.reject( x, isPositiveNumber );
3262
+
* // returns [ -2, -3 ]
3263
+
*/
3264
+
reject: typeofreject;
3265
+
3118
3266
/**
3119
3267
* Returns an accessor function for retrieving an element from an indexed array-like object.
3120
3268
*
@@ -3192,6 +3340,12 @@ interface Namespace {
3192
3340
* @returns output array
3193
3341
*
3194
3342
* @example
3343
+
* var x = [ 1, 2, 3 ];
3344
+
*
3345
+
* var out = ns.slice( x, 0, 3 );
3346
+
* // returns [ 1, 2, 3 ]
3347
+
*
3348
+
* @example
3195
3349
* var x = [ 1, 2, 3, 4, 5, 6 ];
3196
3350
*
3197
3351
* var out = ns.slice( x, 0, 3 );
@@ -3308,21 +3462,28 @@ interface Namespace {
3308
3462
strided2array5d: typeofstrided2array5d;
3309
3463
3310
3464
/**
3311
-
* Takes element from an array.
3312
-
*
3313
-
* ## Notes
3314
-
*
3315
-
* - The function does **not** perform bounds checking. If an index is less than zero or greater than the maximum index of `x`, the value of the corresponding element in the output array is undefined.
0 commit comments