@stdlib/ndarray-reject 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1612 @@
1
+ /*
2
+ * @license Apache-2.0
3
+ *
4
+ * Copyright (c) 2024 The Stdlib Authors.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ // TypeScript Version: 4.1
20
+
21
+ /// <reference types="@stdlib/types"/>
22
+
23
+ /* eslint-disable max-lines */
24
+
25
+ import { typedndarray, DataType, Order, float64ndarray, float32ndarray, complex128ndarray, complex64ndarray, int32ndarray, int16ndarray, int8ndarray, uint32ndarray, uint16ndarray, uint8ndarray, uint8cndarray, boolndarray, genericndarray } from '@stdlib/types/ndarray';
26
+ import { Complex64, Complex128 } from '@stdlib/types/complex';
27
+
28
+ /**
29
+ * Returns a boolean indicating whether an element passes a test.
30
+ *
31
+ * @returns boolean indicating whether an element passes a test
32
+ */
33
+ type Nullary<V> = ( this: V ) => boolean;
34
+
35
+ /**
36
+ * Returns a boolean indicating whether an element passes a test.
37
+ *
38
+ * @param value - current array element
39
+ * @returns boolean indicating whether an element passes a test
40
+ */
41
+ type Unary<T, V> = ( this: V, value: T ) => boolean;
42
+
43
+ /**
44
+ * Returns a boolean indicating whether an element passes a test.
45
+ *
46
+ * @param value - current array element
47
+ * @param indices - current array element indices
48
+ * @returns boolean indicating whether an element passes a test
49
+ */
50
+ type Binary<T, V> = ( this: V, value: T, indices: Array<number> ) => boolean;
51
+
52
+ /**
53
+ * Returns a boolean indicating whether an element passes a test.
54
+ *
55
+ * @param value - current array element
56
+ * @param indices - current array element indices
57
+ * @param arr - input array
58
+ * @returns boolean indicating whether an element passes a test
59
+ */
60
+ type Ternary<T, V> = ( this: V, value: T, indices: Array<number>, arr: typedndarray<T> ) => boolean;
61
+
62
+ /**
63
+ * Returns a boolean indicating whether an element passes a test.
64
+ *
65
+ * @param value - current array element
66
+ * @param indices - current array element indices
67
+ * @param arr - input array
68
+ * @returns boolean indicating whether an element passes a test
69
+ */
70
+ type Predicate<T, V> = Nullary<V> | Unary<T, V> | Binary<T, V> | Ternary<T, V>;
71
+
72
+ /**
73
+ * Interface describing "base" function options.
74
+ */
75
+ interface BaseOptions {
76
+ /**
77
+ * Index iteration order.
78
+ *
79
+ * ## Notes
80
+ *
81
+ * - By default, the function iterates over elements according to the layout order of the provided ndarray. Accordingly, for row-major input ndarrays, the last dimension indices increment fastest. For column-major input ndarrays, the first dimension indices increment fastest. To override the inferred order and ensure that indices increment in a specific manner, regardless of the input ndarray's layout order, explicitly set the iteration order. Note, however, that iterating according to an order which does not match that of the input ndarray may, in some circumstances, result in performance degradation due to cache misses.
82
+ */
83
+ order?: Order;
84
+ }
85
+
86
+ /**
87
+ * Interface describing function options.
88
+ */
89
+ interface OrderOptions {
90
+ /**
91
+ * Index iteration order.
92
+ *
93
+ * ## Notes
94
+ *
95
+ * - By default, the function iterates over elements according to the layout order of the provided ndarray. Accordingly, for row-major input ndarrays, the last dimension indices increment fastest. For column-major input ndarrays, the first dimension indices increment fastest. To override the inferred order and ensure that indices increment in a specific manner, regardless of the input ndarray's layout order, explicitly set the iteration order. Note, however, that iterating according to an order which does not match that of the input ndarray may, in some circumstances, result in performance degradation due to cache misses.
96
+ */
97
+ order: Order;
98
+ }
99
+
100
+ /**
101
+ * Interface describing function options.
102
+ */
103
+ interface Options extends BaseOptions {
104
+ /**
105
+ * Output ndarray data type.
106
+ *
107
+ * ## Notes
108
+ *
109
+ * - This option overrides using the input ndarray's inferred data type.
110
+ */
111
+ dtype?: DataType;
112
+ }
113
+
114
+ /**
115
+ * Interface describing function options.
116
+ */
117
+ interface Float64Options extends Options {
118
+ /**
119
+ * Output ndarray data type.
120
+ *
121
+ * ## Notes
122
+ *
123
+ * - This option overrides using the input ndarray's inferred data type.
124
+ */
125
+ dtype?: 'float64';
126
+ }
127
+
128
+ /**
129
+ * Interface describing function options.
130
+ */
131
+ interface Float32Options extends Options {
132
+ /**
133
+ * Output ndarray data type.
134
+ *
135
+ * ## Notes
136
+ *
137
+ * - This option overrides using the input ndarray's inferred data type.
138
+ */
139
+ dtype?: 'float32';
140
+ }
141
+
142
+ /**
143
+ * Interface describing function options.
144
+ */
145
+ interface Complex128Options extends Options {
146
+ /**
147
+ * Output ndarray data type.
148
+ *
149
+ * ## Notes
150
+ *
151
+ * - This option overrides using the input ndarray's inferred data type.
152
+ */
153
+ dtype?: 'complex128';
154
+ }
155
+
156
+ /**
157
+ * Interface describing function options.
158
+ */
159
+ interface Complex64Options extends Options {
160
+ /**
161
+ * Output ndarray data type.
162
+ *
163
+ * ## Notes
164
+ *
165
+ * - This option overrides using the input ndarray's inferred data type.
166
+ */
167
+ dtype?: 'complex64';
168
+ }
169
+
170
+ /**
171
+ * Interface describing function options.
172
+ */
173
+ interface Int32Options extends Options {
174
+ /**
175
+ * Output ndarray data type.
176
+ *
177
+ * ## Notes
178
+ *
179
+ * - This option overrides using the input ndarray's inferred data type.
180
+ */
181
+ dtype?: 'int32';
182
+ }
183
+
184
+ /**
185
+ * Interface describing function options.
186
+ */
187
+ interface Int16Options extends Options {
188
+ /**
189
+ * Output ndarray data type.
190
+ *
191
+ * ## Notes
192
+ *
193
+ * - This option overrides using the input ndarray's inferred data type.
194
+ */
195
+ dtype?: 'int16';
196
+ }
197
+
198
+ /**
199
+ * Interface describing function options.
200
+ */
201
+ interface Int8Options extends Options {
202
+ /**
203
+ * Output ndarray data type.
204
+ *
205
+ * ## Notes
206
+ *
207
+ * - This option overrides using the input ndarray's inferred data type.
208
+ */
209
+ dtype?: 'int8';
210
+ }
211
+
212
+ /**
213
+ * Interface describing function options.
214
+ */
215
+ interface Uint32Options extends Options {
216
+ /**
217
+ * Output ndarray data type.
218
+ *
219
+ * ## Notes
220
+ *
221
+ * - This option overrides using the input ndarray's inferred data type.
222
+ */
223
+ dtype?: 'uint32';
224
+ }
225
+
226
+ /**
227
+ * Interface describing function options.
228
+ */
229
+ interface Uint16Options extends Options {
230
+ /**
231
+ * Output ndarray data type.
232
+ *
233
+ * ## Notes
234
+ *
235
+ * - This option overrides using the input ndarray's inferred data type.
236
+ */
237
+ dtype?: 'uint16';
238
+ }
239
+
240
+ /**
241
+ * Interface describing function options.
242
+ */
243
+ interface Uint8Options extends Options {
244
+ /**
245
+ * Output ndarray data type.
246
+ *
247
+ * ## Notes
248
+ *
249
+ * - This option overrides using the input ndarray's inferred data type.
250
+ */
251
+ dtype?: 'uint8';
252
+ }
253
+
254
+ /**
255
+ * Interface describing function options.
256
+ */
257
+ interface Uint8COptions extends Options {
258
+ /**
259
+ * Output ndarray data type.
260
+ *
261
+ * ## Notes
262
+ *
263
+ * - This option overrides using the input ndarray's inferred data type.
264
+ */
265
+ dtype?: 'uint8c';
266
+ }
267
+
268
+ /**
269
+ * Interface describing function options.
270
+ */
271
+ interface BoolOptions extends Options {
272
+ /**
273
+ * Output ndarray data type.
274
+ *
275
+ * ## Notes
276
+ *
277
+ * - This option overrides using the input ndarray's inferred data type.
278
+ */
279
+ dtype?: 'bool';
280
+ }
281
+
282
+ /**
283
+ * Interface describing function options.
284
+ */
285
+ interface GenericOptions extends Options {
286
+ /**
287
+ * Output ndarray data type.
288
+ *
289
+ * ## Notes
290
+ *
291
+ * - This option overrides using the input ndarray's inferred data type.
292
+ */
293
+ dtype?: 'generic';
294
+ }
295
+
296
+ /**
297
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
298
+ *
299
+ * @param x - input ndarray
300
+ * @param predicate - predicate function
301
+ * @param thisArg - predicate function execution context
302
+ * @returns output ndarray
303
+ *
304
+ * @example
305
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
306
+ * var Float64Array = require( '@stdlib/array-float64' );
307
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
308
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
309
+ *
310
+ * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
311
+ * var shape = [ 2, 3 ];
312
+ * var strides = [ 6, 1 ];
313
+ * var offset = 1;
314
+ *
315
+ * var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
316
+ * // returns <ndarray>
317
+ *
318
+ * var y = reject( x, isOdd );
319
+ * // returns <ndarray>
320
+ *
321
+ * var arr = ndarray2array( y );
322
+ * // returns [ 2.0, 4.0, 8.0, 10.0 ]
323
+ */
324
+ declare function reject<V = unknown>( x: float64ndarray, predicate: Predicate<number, V>, thisArg?: ThisParameterType<Predicate<number, V>> ): float64ndarray;
325
+
326
+ /**
327
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
328
+ *
329
+ * @param x - input ndarray
330
+ * @param predicate - predicate function
331
+ * @param thisArg - predicate function execution context
332
+ * @returns output ndarray
333
+ *
334
+ * @example
335
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
336
+ * var Float32Array = require( '@stdlib/array-float32' );
337
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
338
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
339
+ *
340
+ * var buffer = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
341
+ * var shape = [ 2, 3 ];
342
+ * var strides = [ 6, 1 ];
343
+ * var offset = 1;
344
+ *
345
+ * var x = ndarray( 'float32', buffer, shape, strides, offset, 'row-major' );
346
+ * // returns <ndarray>
347
+ *
348
+ * var y = reject( x, isOdd );
349
+ * // returns <ndarray>
350
+ *
351
+ * var arr = ndarray2array( y );
352
+ * // returns [ 2.0, 4.0, 8.0, 10.0 ]
353
+ */
354
+ declare function reject<V = unknown>( x: float32ndarray, predicate: Predicate<number, V>, thisArg?: ThisParameterType<Predicate<number, V>> ): float32ndarray;
355
+
356
+ /**
357
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
358
+ *
359
+ * @param x - input ndarray
360
+ * @param predicate - predicate function
361
+ * @param thisArg - predicate function execution context
362
+ * @returns output ndarray
363
+ *
364
+ * @example
365
+ * var Complex64Array = require( '@stdlib/array-complex64' );
366
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
367
+ *
368
+ * function predicate( z, idx ) {
369
+ * return idx[ 0 ] > 0;
370
+ * }
371
+ *
372
+ * var buffer = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
373
+ * var shape = [ 2, 3 ];
374
+ * var strides = [ 3, 1 ];
375
+ * var offset = 0;
376
+ *
377
+ * var x = ndarray( 'complex64', buffer, shape, strides, offset, 'row-major' );
378
+ * // returns <ndarray>
379
+ *
380
+ * var y = reject( x, predicate );
381
+ * // returns <ndarray>
382
+ */
383
+ declare function reject<V = unknown>( x: complex64ndarray, predicate: Predicate<Complex64, V>, thisArg?: ThisParameterType<Predicate<Complex64, V>> ): complex64ndarray;
384
+
385
+ /**
386
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
387
+ *
388
+ * @param x - input ndarray
389
+ * @param predicate - predicate function
390
+ * @param thisArg - predicate function execution context
391
+ * @returns output ndarray
392
+ *
393
+ * @example
394
+ * var Complex128Array = require( '@stdlib/array-complex128' );
395
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
396
+ *
397
+ * function predicate( z, idx ) {
398
+ * return idx[ 0 ] > 0;
399
+ * }
400
+ *
401
+ * var buffer = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
402
+ * var shape = [ 2, 3 ];
403
+ * var strides = [ 3, 1 ];
404
+ * var offset = 0;
405
+ *
406
+ * var x = ndarray( 'complex128', buffer, shape, strides, offset, 'row-major' );
407
+ * // returns <ndarray>
408
+ *
409
+ * var y = reject( x, predicate );
410
+ * // returns <ndarray>
411
+ */
412
+ declare function reject<V = unknown>( x: complex128ndarray, predicate: Predicate<Complex128, V>, thisArg?: ThisParameterType<Predicate<Complex128, V>> ): complex128ndarray;
413
+
414
+ /**
415
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
416
+ *
417
+ * @param x - input ndarray
418
+ * @param predicate - predicate function
419
+ * @param thisArg - predicate function execution context
420
+ * @returns output ndarray
421
+ *
422
+ * @example
423
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
424
+ * var Int32Array = require( '@stdlib/array-int32' );
425
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
426
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
427
+ *
428
+ * var buffer = new Int32Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] );
429
+ * var shape = [ 2, 3 ];
430
+ * var strides = [ 6, 1 ];
431
+ * var offset = 1;
432
+ *
433
+ * var x = ndarray( 'int32', buffer, shape, strides, offset, 'row-major' );
434
+ * // returns <ndarray>
435
+ *
436
+ * var y = reject( x, isOdd );
437
+ * // returns <ndarray>
438
+ *
439
+ * var arr = ndarray2array( y );
440
+ * // returns [ 2, 4, 8, 10 ]
441
+ */
442
+ declare function reject<V = unknown>( x: int32ndarray, predicate: Predicate<number, V>, thisArg?: ThisParameterType<Predicate<number, V>> ): int32ndarray;
443
+
444
+ /**
445
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
446
+ *
447
+ * @param x - input ndarray
448
+ * @param predicate - predicate function
449
+ * @param thisArg - predicate function execution context
450
+ * @returns output ndarray
451
+ *
452
+ * @example
453
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
454
+ * var Int16Array = require( '@stdlib/array-int16' );
455
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
456
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
457
+ *
458
+ * var buffer = new Int16Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] );
459
+ * var shape = [ 2, 3 ];
460
+ * var strides = [ 6, 1 ];
461
+ * var offset = 1;
462
+ *
463
+ * var x = ndarray( 'int16', buffer, shape, strides, offset, 'row-major' );
464
+ * // returns <ndarray>
465
+ *
466
+ * var y = reject( x, isOdd );
467
+ * // returns <ndarray>
468
+ *
469
+ * var arr = ndarray2array( y );
470
+ * // returns [ 2, 4, 8, 10 ]
471
+ */
472
+ declare function reject<V = unknown>( x: int16ndarray, predicate: Predicate<number, V>, thisArg?: ThisParameterType<Predicate<number, V>> ): int16ndarray;
473
+
474
+ /**
475
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
476
+ *
477
+ * @param x - input ndarray
478
+ * @param predicate - predicate function
479
+ * @param thisArg - predicate function execution context
480
+ * @returns output ndarray
481
+ *
482
+ * @example
483
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
484
+ * var Int8Array = require( '@stdlib/array-int8' );
485
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
486
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
487
+ *
488
+ * var buffer = new Int8Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] );
489
+ * var shape = [ 2, 3 ];
490
+ * var strides = [ 6, 1 ];
491
+ * var offset = 1;
492
+ *
493
+ * var x = ndarray( 'int8', buffer, shape, strides, offset, 'row-major' );
494
+ * // returns <ndarray>
495
+ *
496
+ * var y = reject( x, isOdd );
497
+ * // returns <ndarray>
498
+ *
499
+ * var arr = ndarray2array( y );
500
+ * // returns [ 2, 4, 8, 10 ]
501
+ */
502
+ declare function reject<V = unknown>( x: int8ndarray, predicate: Predicate<number, V>, thisArg?: ThisParameterType<Predicate<number, V>> ): int8ndarray;
503
+
504
+ /**
505
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
506
+ *
507
+ * @param x - input ndarray
508
+ * @param predicate - predicate function
509
+ * @param thisArg - predicate function execution context
510
+ * @returns output ndarray
511
+ *
512
+ * @example
513
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
514
+ * var Uint32Array = require( '@stdlib/array-uint32' );
515
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
516
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
517
+ *
518
+ * var buffer = new Uint32Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] );
519
+ * var shape = [ 2, 3 ];
520
+ * var strides = [ 6, 1 ];
521
+ * var offset = 1;
522
+ *
523
+ * var x = ndarray( 'uint32', buffer, shape, strides, offset, 'row-major' );
524
+ * // returns <ndarray>
525
+ *
526
+ * var y = reject( x, isOdd );
527
+ * // returns <ndarray>
528
+ *
529
+ * var arr = ndarray2array( y );
530
+ * // returns [ 2, 4, 8, 10 ]
531
+ */
532
+ declare function reject<V = unknown>( x: uint32ndarray, predicate: Predicate<number, V>, thisArg?: ThisParameterType<Predicate<number, V>> ): uint32ndarray;
533
+
534
+ /**
535
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
536
+ *
537
+ * @param x - input ndarray
538
+ * @param predicate - predicate function
539
+ * @param thisArg - predicate function execution context
540
+ * @returns output ndarray
541
+ *
542
+ * @example
543
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
544
+ * var Uint16Array = require( '@stdlib/array-uint16' );
545
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
546
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
547
+ *
548
+ * var buffer = new Uint16Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] );
549
+ * var shape = [ 2, 3 ];
550
+ * var strides = [ 6, 1 ];
551
+ * var offset = 1;
552
+ *
553
+ * var x = ndarray( 'uint16', buffer, shape, strides, offset, 'row-major' );
554
+ * // returns <ndarray>
555
+ *
556
+ * var y = reject( x, isOdd );
557
+ * // returns <ndarray>
558
+ *
559
+ * var arr = ndarray2array( y );
560
+ * // returns [ 2, 4, 8, 10 ]
561
+ */
562
+ declare function reject<V = unknown>( x: uint16ndarray, predicate: Predicate<number, V>, thisArg?: ThisParameterType<Predicate<number, V>> ): uint16ndarray;
563
+
564
+ /**
565
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
566
+ *
567
+ * @param x - input ndarray
568
+ * @param predicate - predicate function
569
+ * @param thisArg - predicate function execution context
570
+ * @returns output ndarray
571
+ *
572
+ * @example
573
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
574
+ * var Uint8Array = require( '@stdlib/array-uint8' );
575
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
576
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
577
+ *
578
+ * var buffer = new Uint8Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] );
579
+ * var shape = [ 2, 3 ];
580
+ * var strides = [ 6, 1 ];
581
+ * var offset = 1;
582
+ *
583
+ * var x = ndarray( 'uint8', buffer, shape, strides, offset, 'row-major' );
584
+ * // returns <ndarray>
585
+ *
586
+ * var y = reject( x, isOdd );
587
+ * // returns <ndarray>
588
+ *
589
+ * var arr = ndarray2array( y );
590
+ * // returns [ 2, 4, 8, 10 ]
591
+ */
592
+ declare function reject<V = unknown>( x: uint8ndarray, predicate: Predicate<number, V>, thisArg?: ThisParameterType<Predicate<number, V>> ): uint8ndarray;
593
+
594
+ /**
595
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
596
+ *
597
+ * @param x - input ndarray
598
+ * @param predicate - predicate function
599
+ * @param thisArg - predicate function execution context
600
+ * @returns output ndarray
601
+ *
602
+ * @example
603
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
604
+ * var Uint8ClampedArray = require( '@stdlib/array-uint8c' );
605
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
606
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
607
+ *
608
+ * var buffer = new Uint8ClampedArray( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] );
609
+ * var shape = [ 2, 3 ];
610
+ * var strides = [ 6, 1 ];
611
+ * var offset = 1;
612
+ *
613
+ * var x = ndarray( 'uint8c', buffer, shape, strides, offset, 'row-major' );
614
+ * // returns <ndarray>
615
+ *
616
+ * var y = reject( x, isOdd );
617
+ * // returns <ndarray>
618
+ *
619
+ * var arr = ndarray2array( y );
620
+ * // returns [ 2, 4, 8, 10 ]
621
+ */
622
+ declare function reject<V = unknown>( x: uint8cndarray, predicate: Predicate<number, V>, thisArg?: ThisParameterType<Predicate<number, V>> ): uint8cndarray;
623
+
624
+ /**
625
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
626
+ *
627
+ * @param x - input ndarray
628
+ * @param predicate - predicate function
629
+ * @param thisArg - predicate function execution context
630
+ * @returns output ndarray
631
+ *
632
+ * @example
633
+ * var BooleanArray = require( '@stdlib/array-bool' );
634
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
635
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
636
+ *
637
+ * function predicate( v ) {
638
+ * return !v;
639
+ * }
640
+ *
641
+ * var buffer = new BooleanArray( [ false, true, false, true, false, true, false, true, false, true, false, true ] );
642
+ * var shape = [ 2, 3 ];
643
+ * var strides = [ 6, 1 ];
644
+ * var offset = 1;
645
+ *
646
+ * var x = ndarray( 'bool', buffer, shape, strides, offset, 'row-major' );
647
+ * // returns <ndarray>
648
+ *
649
+ * var y = reject( x, predicate );
650
+ * // returns <ndarray>
651
+ *
652
+ * var arr = ndarray2array( y );
653
+ * // returns [ true, true, true, true ]
654
+ */
655
+ declare function reject<V = unknown>( x: boolndarray, predicate: Predicate<boolean, V>, thisArg?: ThisParameterType<Predicate<boolean, V>> ): boolndarray;
656
+
657
+ /**
658
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
659
+ *
660
+ * @param x - input ndarray
661
+ * @param predicate - predicate function
662
+ * @param thisArg - predicate function execution context
663
+ * @returns output ndarray
664
+ *
665
+ * @example
666
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
667
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
668
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
669
+ *
670
+ * var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ];
671
+ * var shape = [ 2, 3 ];
672
+ * var strides = [ 6, 1 ];
673
+ * var offset = 1;
674
+ *
675
+ * var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );
676
+ * // returns <ndarray>
677
+ *
678
+ * var y = reject( x, isOdd );
679
+ * // returns <ndarray>
680
+ *
681
+ * var arr = ndarray2array( y );
682
+ * // returns [ 2.0, 4.0, 8.0, 10.0 ]
683
+ */
684
+ declare function reject<T = unknown, V = unknown>( x: genericndarray<T>, predicate: Predicate<T, V>, thisArg?: ThisParameterType<Predicate<T, V>> ): genericndarray<T>;
685
+
686
+ /**
687
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
688
+ *
689
+ * @param x - input ndarray
690
+ * @param options - function options
691
+ * @param options.order - iteration order
692
+ * @param predicate - predicate function
693
+ * @param thisArg - predicate function execution context
694
+ * @returns output ndarray
695
+ *
696
+ * @example
697
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
698
+ * var Float64Array = require( '@stdlib/array-float64' );
699
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
700
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
701
+ *
702
+ * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
703
+ * var shape = [ 2, 3 ];
704
+ * var strides = [ 6, 1 ];
705
+ * var offset = 1;
706
+ *
707
+ * var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
708
+ * // returns <ndarray>
709
+ *
710
+ * var opts = {
711
+ * 'order': 'row-major'
712
+ * };
713
+ * var y = reject( x, opts, isOdd );
714
+ * // returns <ndarray>
715
+ *
716
+ * var arr = ndarray2array( y );
717
+ * // returns [ 2.0, 4.0, 8.0, 10.0 ]
718
+ */
719
+ declare function reject<V = unknown>( x: float64ndarray, options: OrderOptions, predicate: Predicate<number, V>, thisArg?: ThisParameterType<Predicate<number, V>> ): float64ndarray;
720
+
721
+ /**
722
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
723
+ *
724
+ * @param x - input ndarray
725
+ * @param options - function options
726
+ * @param options.order - iteration order
727
+ * @param predicate - predicate function
728
+ * @param thisArg - predicate function execution context
729
+ * @returns output ndarray
730
+ *
731
+ * @example
732
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
733
+ * var Float32Array = require( '@stdlib/array-float32' );
734
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
735
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
736
+ *
737
+ * var buffer = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
738
+ * var shape = [ 2, 3 ];
739
+ * var strides = [ 6, 1 ];
740
+ * var offset = 1;
741
+ *
742
+ * var x = ndarray( 'float32', buffer, shape, strides, offset, 'row-major' );
743
+ * // returns <ndarray>
744
+ *
745
+ * var opts = {
746
+ * 'order': 'row-major'
747
+ * };
748
+ * var y = reject( x, opts, isOdd );
749
+ * // returns <ndarray>
750
+ *
751
+ * var arr = ndarray2array( y );
752
+ * // returns [ 2.0, 4.0, 8.0, 10.0 ]
753
+ */
754
+ declare function reject<V = unknown>( x: float32ndarray, options: OrderOptions, predicate: Predicate<number, V>, thisArg?: ThisParameterType<Predicate<number, V>> ): float32ndarray;
755
+
756
+ /**
757
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
758
+ *
759
+ * @param x - input ndarray
760
+ * @param options - function options
761
+ * @param options.order - iteration order
762
+ * @param predicate - predicate function
763
+ * @param thisArg - predicate function execution context
764
+ * @returns output ndarray
765
+ *
766
+ * @example
767
+ * var Complex64Array = require( '@stdlib/array-complex64' );
768
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
769
+ *
770
+ * function predicate( z, idx ) {
771
+ * return idx[ 0 ] > 0;
772
+ * }
773
+ *
774
+ * var buffer = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
775
+ * var shape = [ 2, 3 ];
776
+ * var strides = [ 3, 1 ];
777
+ * var offset = 0;
778
+ *
779
+ * var x = ndarray( 'complex64', buffer, shape, strides, offset, 'row-major' );
780
+ * // returns <ndarray>
781
+ *
782
+ * var opts = {
783
+ * 'order': 'row-major'
784
+ * };
785
+ * var y = reject( x, opts, predicate );
786
+ * // returns <ndarray>
787
+ */
788
+ declare function reject<V = unknown>( x: complex64ndarray, options: OrderOptions, predicate: Predicate<Complex64, V>, thisArg?: ThisParameterType<Predicate<Complex64, V>> ): complex64ndarray;
789
+
790
+ /**
791
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
792
+ *
793
+ * @param x - input ndarray
794
+ * @param options - function options
795
+ * @param options.order - iteration order
796
+ * @param predicate - predicate function
797
+ * @param thisArg - predicate function execution context
798
+ * @returns output ndarray
799
+ *
800
+ * @example
801
+ * var Complex128Array = require( '@stdlib/array-complex128' );
802
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
803
+ *
804
+ * function predicate( z, idx ) {
805
+ * return idx[ 0 ] > 0;
806
+ * }
807
+ *
808
+ * var buffer = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
809
+ * var shape = [ 2, 3 ];
810
+ * var strides = [ 3, 1 ];
811
+ * var offset = 0;
812
+ *
813
+ * var x = ndarray( 'complex128', buffer, shape, strides, offset, 'row-major' );
814
+ * // returns <ndarray>
815
+ *
816
+ * var opts = {
817
+ * 'order': 'row-major'
818
+ * };
819
+ * var y = reject( x, opts, predicate );
820
+ * // returns <ndarray>
821
+ */
822
+ declare function reject<V = unknown>( x: complex128ndarray, options: OrderOptions, predicate: Predicate<Complex128, V>, thisArg?: ThisParameterType<Predicate<Complex128, V>> ): complex128ndarray;
823
+
824
+ /**
825
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
826
+ *
827
+ * @param x - input ndarray
828
+ * @param options - function options
829
+ * @param options.order - iteration order
830
+ * @param predicate - predicate function
831
+ * @param thisArg - predicate function execution context
832
+ * @returns output ndarray
833
+ *
834
+ * @example
835
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
836
+ * var Int32Array = require( '@stdlib/array-int32' );
837
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
838
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
839
+ *
840
+ * var buffer = new Int32Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] );
841
+ * var shape = [ 2, 3 ];
842
+ * var strides = [ 6, 1 ];
843
+ * var offset = 1;
844
+ *
845
+ * var x = ndarray( 'int32', buffer, shape, strides, offset, 'row-major' );
846
+ * // returns <ndarray>
847
+ *
848
+ * var opts = {
849
+ * 'order': 'row-major'
850
+ * };
851
+ * var y = reject( x, opts, isOdd );
852
+ * // returns <ndarray>
853
+ *
854
+ * var arr = ndarray2array( y );
855
+ * // returns [ 2, 4, 8, 10 ]
856
+ */
857
+ declare function reject<V = unknown>( x: int32ndarray, options: OrderOptions, predicate: Predicate<number, V>, thisArg?: ThisParameterType<Predicate<number, V>> ): int32ndarray;
858
+
859
+ /**
860
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
861
+ *
862
+ * @param x - input ndarray
863
+ * @param options - function options
864
+ * @param options.order - iteration order
865
+ * @param predicate - predicate function
866
+ * @param thisArg - predicate function execution context
867
+ * @returns output ndarray
868
+ *
869
+ * @example
870
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
871
+ * var Int16Array = require( '@stdlib/array-int16' );
872
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
873
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
874
+ *
875
+ * var buffer = new Int16Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] );
876
+ * var shape = [ 2, 3 ];
877
+ * var strides = [ 6, 1 ];
878
+ * var offset = 1;
879
+ *
880
+ * var x = ndarray( 'int16', buffer, shape, strides, offset, 'row-major' );
881
+ * // returns <ndarray>
882
+ *
883
+ * var opts = {
884
+ * 'order': 'row-major'
885
+ * };
886
+ * var y = reject( x, opts, isOdd );
887
+ * // returns <ndarray>
888
+ *
889
+ * var arr = ndarray2array( y );
890
+ * // returns [ 2, 4, 8, 10 ]
891
+ */
892
+ declare function reject<V = unknown>( x: int16ndarray, options: OrderOptions, predicate: Predicate<number, V>, thisArg?: ThisParameterType<Predicate<number, V>> ): int16ndarray;
893
+
894
+ /**
895
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
896
+ *
897
+ * @param x - input ndarray
898
+ * @param options - function options
899
+ * @param options.order - iteration order
900
+ * @param predicate - predicate function
901
+ * @param thisArg - predicate function execution context
902
+ * @returns output ndarray
903
+ *
904
+ * @example
905
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
906
+ * var Int8Array = require( '@stdlib/array-int8' );
907
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
908
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
909
+ *
910
+ * var buffer = new Int8Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] );
911
+ * var shape = [ 2, 3 ];
912
+ * var strides = [ 6, 1 ];
913
+ * var offset = 1;
914
+ *
915
+ * var x = ndarray( 'int8', buffer, shape, strides, offset, 'row-major' );
916
+ * // returns <ndarray>
917
+ *
918
+ * var opts = {
919
+ * 'order': 'row-major'
920
+ * };
921
+ * var y = reject( x, opts, isOdd );
922
+ * // returns <ndarray>
923
+ *
924
+ * var arr = ndarray2array( y );
925
+ * // returns [ 2, 4, 8, 10 ]
926
+ */
927
+ declare function reject<V = unknown>( x: int8ndarray, options: OrderOptions, predicate: Predicate<number, V>, thisArg?: ThisParameterType<Predicate<number, V>> ): int8ndarray;
928
+
929
+ /**
930
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
931
+ *
932
+ * @param x - input ndarray
933
+ * @param options - function options
934
+ * @param options.order - iteration order
935
+ * @param predicate - predicate function
936
+ * @param thisArg - predicate function execution context
937
+ * @returns output ndarray
938
+ *
939
+ * @example
940
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
941
+ * var Uint32Array = require( '@stdlib/array-uint32' );
942
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
943
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
944
+ *
945
+ * var buffer = new Uint32Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] );
946
+ * var shape = [ 2, 3 ];
947
+ * var strides = [ 6, 1 ];
948
+ * var offset = 1;
949
+ *
950
+ * var x = ndarray( 'uint32', buffer, shape, strides, offset, 'row-major' );
951
+ * // returns <ndarray>
952
+ *
953
+ * var opts = {
954
+ * 'order': 'row-major'
955
+ * };
956
+ * var y = reject( x, opts, isOdd );
957
+ * // returns <ndarray>
958
+ *
959
+ * var arr = ndarray2array( y );
960
+ * // returns [ 2, 4, 8, 10 ]
961
+ */
962
+ declare function reject<V = unknown>( x: uint32ndarray, options: OrderOptions, predicate: Predicate<number, V>, thisArg?: ThisParameterType<Predicate<number, V>> ): uint32ndarray;
963
+
964
+ /**
965
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
966
+ *
967
+ * @param x - input ndarray
968
+ * @param options - function options
969
+ * @param options.order - iteration order
970
+ * @param predicate - predicate function
971
+ * @param thisArg - predicate function execution context
972
+ * @returns output ndarray
973
+ *
974
+ * @example
975
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
976
+ * var Uint16Array = require( '@stdlib/array-uint16' );
977
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
978
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
979
+ *
980
+ * var buffer = new Uint16Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] );
981
+ * var shape = [ 2, 3 ];
982
+ * var strides = [ 6, 1 ];
983
+ * var offset = 1;
984
+ *
985
+ * var x = ndarray( 'uint16', buffer, shape, strides, offset, 'row-major' );
986
+ * // returns <ndarray>
987
+ *
988
+ * var opts = {
989
+ * 'order': 'row-major'
990
+ * };
991
+ * var y = reject( x, opts, isOdd );
992
+ * // returns <ndarray>
993
+ *
994
+ * var arr = ndarray2array( y );
995
+ * // returns [ 2, 4, 8, 10 ]
996
+ */
997
+ declare function reject<V = unknown>( x: uint16ndarray, options: OrderOptions, predicate: Predicate<number, V>, thisArg?: ThisParameterType<Predicate<number, V>> ): uint16ndarray;
998
+
999
+ /**
1000
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
1001
+ *
1002
+ * @param x - input ndarray
1003
+ * @param options - function options
1004
+ * @param options.order - iteration order
1005
+ * @param predicate - predicate function
1006
+ * @param thisArg - predicate function execution context
1007
+ * @returns output ndarray
1008
+ *
1009
+ * @example
1010
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
1011
+ * var Uint8Array = require( '@stdlib/array-uint8' );
1012
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
1013
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
1014
+ *
1015
+ * var buffer = new Uint8Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] );
1016
+ * var shape = [ 2, 3 ];
1017
+ * var strides = [ 6, 1 ];
1018
+ * var offset = 1;
1019
+ *
1020
+ * var x = ndarray( 'uint8', buffer, shape, strides, offset, 'row-major' );
1021
+ * // returns <ndarray>
1022
+ *
1023
+ * var opts = {
1024
+ * 'order': 'row-major'
1025
+ * };
1026
+ * var y = reject( x, opts, isOdd );
1027
+ * // returns <ndarray>
1028
+ *
1029
+ * var arr = ndarray2array( y );
1030
+ * // returns [ 2, 4, 8, 10 ]
1031
+ */
1032
+ declare function reject<V = unknown>( x: uint8ndarray, options: OrderOptions, predicate: Predicate<number, V>, thisArg?: ThisParameterType<Predicate<number, V>> ): uint8ndarray;
1033
+
1034
+ /**
1035
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
1036
+ *
1037
+ * @param x - input ndarray
1038
+ * @param options - function options
1039
+ * @param options.order - iteration order
1040
+ * @param predicate - predicate function
1041
+ * @param thisArg - predicate function execution context
1042
+ * @returns output ndarray
1043
+ *
1044
+ * @example
1045
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
1046
+ * var Uint8ClampedArray = require( '@stdlib/array-uint8c' );
1047
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
1048
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
1049
+ *
1050
+ * var buffer = new Uint8ClampedArray( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] );
1051
+ * var shape = [ 2, 3 ];
1052
+ * var strides = [ 6, 1 ];
1053
+ * var offset = 1;
1054
+ *
1055
+ * var x = ndarray( 'uint8c', buffer, shape, strides, offset, 'row-major' );
1056
+ * // returns <ndarray>
1057
+ *
1058
+ * var opts = {
1059
+ * 'order': 'row-major'
1060
+ * };
1061
+ * var y = reject( x, opts, isOdd );
1062
+ * // returns <ndarray>
1063
+ *
1064
+ * var arr = ndarray2array( y );
1065
+ * // returns [ 2, 4, 8, 10 ]
1066
+ */
1067
+ declare function reject<V = unknown>( x: uint8cndarray, options: OrderOptions, predicate: Predicate<number, V>, thisArg?: ThisParameterType<Predicate<number, V>> ): uint8cndarray;
1068
+
1069
+ /**
1070
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
1071
+ *
1072
+ * @param x - input ndarray
1073
+ * @param options - function options
1074
+ * @param options.order - iteration order
1075
+ * @param predicate - predicate function
1076
+ * @param thisArg - predicate function execution context
1077
+ * @returns output ndarray
1078
+ *
1079
+ * @example
1080
+ * var BooleanArray = require( '@stdlib/array-bool' );
1081
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
1082
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
1083
+ *
1084
+ * function predicate( v ) {
1085
+ * return !v;
1086
+ * }
1087
+ *
1088
+ * var buffer = new BooleanArray( [ false, true, false, true, false, true, false, true, false, true, false, true ] );
1089
+ * var shape = [ 2, 3 ];
1090
+ * var strides = [ 6, 1 ];
1091
+ * var offset = 1;
1092
+ *
1093
+ * var x = ndarray( 'bool', buffer, shape, strides, offset, 'row-major' );
1094
+ * // returns <ndarray>
1095
+ *
1096
+ * var opts = {
1097
+ * 'order': 'row-major'
1098
+ * };
1099
+ * var y = reject( x, opts, predicate );
1100
+ * // returns <ndarray>
1101
+ *
1102
+ * var arr = ndarray2array( y );
1103
+ * // returns [ true, true, true, true ]
1104
+ */
1105
+ declare function reject<V = unknown>( x: boolndarray, options: OrderOptions, predicate: Predicate<boolean, V>, thisArg?: ThisParameterType<Predicate<boolean, V>> ): boolndarray;
1106
+
1107
+ /**
1108
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
1109
+ *
1110
+ * @param x - input ndarray
1111
+ * @param options - function options
1112
+ * @param options.order - iteration order
1113
+ * @param predicate - predicate function
1114
+ * @param thisArg - predicate function execution context
1115
+ * @returns output ndarray
1116
+ *
1117
+ * @example
1118
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
1119
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
1120
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
1121
+ *
1122
+ * var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ];
1123
+ * var shape = [ 2, 3 ];
1124
+ * var strides = [ 6, 1 ];
1125
+ * var offset = 1;
1126
+ *
1127
+ * var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );
1128
+ * // returns <ndarray>
1129
+ *
1130
+ * var opts = {
1131
+ * 'order': 'row-major'
1132
+ * };
1133
+ * var y = reject( x, opts, isOdd );
1134
+ * // returns <ndarray>
1135
+ *
1136
+ * var arr = ndarray2array( y );
1137
+ * // returns [ 2.0, 4.0, 8.0, 10.0 ]
1138
+ */
1139
+ declare function reject<T = unknown, V = unknown>( x: genericndarray<T>, options: OrderOptions, predicate: Predicate<T, V>, thisArg?: ThisParameterType<Predicate<T, V>> ): genericndarray<T>;
1140
+
1141
+ /**
1142
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
1143
+ *
1144
+ * @param x - input ndarray
1145
+ * @param options - options
1146
+ * @param options.dtype - output ndarray data type
1147
+ * @param options.order - iteration order
1148
+ * @param predicate - predicate function
1149
+ * @param thisArg - predicate function execution context
1150
+ * @returns output ndarray
1151
+ *
1152
+ * @example
1153
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
1154
+ * var Float64Array = require( '@stdlib/array-float64' );
1155
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
1156
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
1157
+ *
1158
+ * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
1159
+ * var shape = [ 2, 3 ];
1160
+ * var strides = [ 6, 1 ];
1161
+ * var offset = 1;
1162
+ *
1163
+ * var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
1164
+ * // returns <ndarray>
1165
+ *
1166
+ * var opts = {
1167
+ * 'dtype': 'float64'
1168
+ * };
1169
+ * var y = reject( x, opts, isOdd );
1170
+ * // returns <ndarray>
1171
+ *
1172
+ * var arr = ndarray2array( y );
1173
+ * // returns [ 2.0, 4.0, 8.0, 10.0 ]
1174
+ */
1175
+ declare function reject<T = unknown, V = unknown>( x: typedndarray<T>, options: Float64Options, predicate: Predicate<T, V>, thisArg?: ThisParameterType<Predicate<T, V>> ): float64ndarray;
1176
+
1177
+ /**
1178
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
1179
+ *
1180
+ * @param x - input ndarray
1181
+ * @param options - options
1182
+ * @param options.dtype - output ndarray data type
1183
+ * @param options.order - iteration order
1184
+ * @param predicate - predicate function
1185
+ * @param thisArg - predicate function execution context
1186
+ * @returns output ndarray
1187
+ *
1188
+ * @example
1189
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
1190
+ * var Float64Array = require( '@stdlib/array-float64' );
1191
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
1192
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
1193
+ *
1194
+ * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
1195
+ * var shape = [ 2, 3 ];
1196
+ * var strides = [ 6, 1 ];
1197
+ * var offset = 1;
1198
+ *
1199
+ * var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
1200
+ * // returns <ndarray>
1201
+ *
1202
+ * var opts = {
1203
+ * 'dtype': 'float32'
1204
+ * };
1205
+ * var y = reject( x, opts, isOdd );
1206
+ * // returns <ndarray>
1207
+ *
1208
+ * var arr = ndarray2array( y );
1209
+ * // returns [ 2.0, 4.0, 8.0, 10.0 ]
1210
+ */
1211
+ declare function reject<T = unknown, V = unknown>( x: typedndarray<T>, options: Float32Options, predicate: Predicate<T, V>, thisArg?: ThisParameterType<Predicate<T, V>> ): float32ndarray;
1212
+
1213
+ /**
1214
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
1215
+ *
1216
+ * @param x - input ndarray
1217
+ * @param options - options
1218
+ * @param options.dtype - output ndarray data type
1219
+ * @param options.order - iteration order
1220
+ * @param predicate - predicate function
1221
+ * @param thisArg - predicate function execution context
1222
+ * @returns output ndarray
1223
+ *
1224
+ * @example
1225
+ * var Complex128Array = require( '@stdlib/array-complex128' );
1226
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
1227
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
1228
+ *
1229
+ * function predicate( z, idx ) {
1230
+ * return idx[ 0 ] > 0;
1231
+ * }
1232
+ *
1233
+ * var buffer = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
1234
+ * var shape = [ 2, 3 ];
1235
+ * var strides = [ 3, 1 ];
1236
+ * var offset = 0;
1237
+ *
1238
+ * var x = ndarray( 'complex128', buffer, shape, strides, offset, 'row-major' );
1239
+ * // returns <ndarray>
1240
+ *
1241
+ * var opts = {
1242
+ * 'dtype': 'complex128'
1243
+ * };
1244
+ * var y = reject( x, opts, predicate );
1245
+ * // returns <ndarray>
1246
+ */
1247
+ declare function reject<T = unknown, V = unknown>( x: typedndarray<T>, options: Complex128Options, predicate: Predicate<T, V>, thisArg?: ThisParameterType<Predicate<T, V>> ): complex128ndarray;
1248
+
1249
+ /**
1250
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
1251
+ *
1252
+ * @param x - input ndarray
1253
+ * @param options - options
1254
+ * @param options.dtype - output ndarray data type
1255
+ * @param options.order - iteration order
1256
+ * @param predicate - predicate function
1257
+ * @param thisArg - predicate function execution context
1258
+ * @returns output ndarray
1259
+ *
1260
+ * @example
1261
+ * var Complex128Array = require( '@stdlib/array-complex128' );
1262
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
1263
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
1264
+ *
1265
+ * function predicate( z, idx ) {
1266
+ * return idx[ 0 ] > 0;
1267
+ * }
1268
+ *
1269
+ * var buffer = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
1270
+ * var shape = [ 2, 3 ];
1271
+ * var strides = [ 3, 1 ];
1272
+ * var offset = 0;
1273
+ *
1274
+ * var x = ndarray( 'complex128', buffer, shape, strides, offset, 'row-major' );
1275
+ * // returns <ndarray>
1276
+ *
1277
+ * var opts = {
1278
+ * 'dtype': 'complex64'
1279
+ * };
1280
+ * var y = reject( x, opts, predicate );
1281
+ * // returns <ndarray>
1282
+ */
1283
+ declare function reject<T = unknown, V = unknown>( x: typedndarray<T>, options: Complex64Options, predicate: Predicate<T, V>, thisArg?: ThisParameterType<Predicate<T, V>> ): complex64ndarray;
1284
+
1285
+ /**
1286
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
1287
+ *
1288
+ * @param x - input ndarray
1289
+ * @param options - options
1290
+ * @param options.dtype - output ndarray data type
1291
+ * @param options.order - iteration order
1292
+ * @param predicate - predicate function
1293
+ * @param thisArg - predicate function execution context
1294
+ * @returns output ndarray
1295
+ *
1296
+ * @example
1297
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
1298
+ * var Float64Array = require( '@stdlib/array-float64' );
1299
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
1300
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
1301
+ *
1302
+ * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
1303
+ * var shape = [ 2, 3 ];
1304
+ * var strides = [ 6, 1 ];
1305
+ * var offset = 1;
1306
+ *
1307
+ * var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
1308
+ * // returns <ndarray>
1309
+ *
1310
+ * var opts = {
1311
+ * 'dtype': 'int32'
1312
+ * };
1313
+ * var y = reject( x, opts, isOdd );
1314
+ * // returns <ndarray>
1315
+ *
1316
+ * var arr = ndarray2array( y );
1317
+ * // returns [ 2, 4, 8, 10 ]
1318
+ */
1319
+ declare function reject<T = unknown, V = unknown>( x: typedndarray<T>, options: Int32Options, predicate: Predicate<T, V>, thisArg?: ThisParameterType<Predicate<T, V>> ): int32ndarray;
1320
+
1321
+ /**
1322
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
1323
+ *
1324
+ * @param x - input ndarray
1325
+ * @param options - options
1326
+ * @param options.dtype - output ndarray data type
1327
+ * @param options.order - iteration order
1328
+ * @param predicate - predicate function
1329
+ * @param thisArg - predicate function execution context
1330
+ * @returns output ndarray
1331
+ *
1332
+ * @example
1333
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
1334
+ * var Float64Array = require( '@stdlib/array-float64' );
1335
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
1336
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
1337
+ *
1338
+ * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
1339
+ * var shape = [ 2, 3 ];
1340
+ * var strides = [ 6, 1 ];
1341
+ * var offset = 1;
1342
+ *
1343
+ * var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
1344
+ * // returns <ndarray>
1345
+ *
1346
+ * var opts = {
1347
+ * 'dtype': 'int16'
1348
+ * };
1349
+ * var y = reject( x, opts, isOdd );
1350
+ * // returns <ndarray>
1351
+ *
1352
+ * var arr = ndarray2array( y );
1353
+ * // returns [ 2, 4, 8, 10 ]
1354
+ */
1355
+ declare function reject<T = unknown, V = unknown>( x: typedndarray<T>, options: Int16Options, predicate: Predicate<T, V>, thisArg?: ThisParameterType<Predicate<T, V>> ): int16ndarray;
1356
+
1357
+ /**
1358
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
1359
+ *
1360
+ * @param x - input ndarray
1361
+ * @param options - options
1362
+ * @param options.dtype - output ndarray data type
1363
+ * @param options.order - iteration order
1364
+ * @param predicate - predicate function
1365
+ * @param thisArg - predicate function execution context
1366
+ * @returns output ndarray
1367
+ *
1368
+ * @example
1369
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
1370
+ * var Float64Array = require( '@stdlib/array-float64' );
1371
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
1372
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
1373
+ *
1374
+ * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
1375
+ * var shape = [ 2, 3 ];
1376
+ * var strides = [ 6, 1 ];
1377
+ * var offset = 1;
1378
+ *
1379
+ * var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
1380
+ * // returns <ndarray>
1381
+ *
1382
+ * var opts = {
1383
+ * 'dtype': 'int8'
1384
+ * };
1385
+ * var y = reject( x, opts, isOdd );
1386
+ * // returns <ndarray>
1387
+ *
1388
+ * var arr = ndarray2array( y );
1389
+ * // returns [ 2, 4, 8, 10 ]
1390
+ */
1391
+ declare function reject<T = unknown, V = unknown>( x: typedndarray<T>, options: Int8Options, predicate: Predicate<T, V>, thisArg?: ThisParameterType<Predicate<T, V>> ): int8ndarray;
1392
+
1393
+ /**
1394
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
1395
+ *
1396
+ * @param x - input ndarray
1397
+ * @param options - options
1398
+ * @param options.dtype - output ndarray data type
1399
+ * @param options.order - iteration order
1400
+ * @param predicate - predicate function
1401
+ * @param thisArg - predicate function execution context
1402
+ * @returns output ndarray
1403
+ *
1404
+ * @example
1405
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
1406
+ * var Float64Array = require( '@stdlib/array-float64' );
1407
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
1408
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
1409
+ *
1410
+ * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
1411
+ * var shape = [ 2, 3 ];
1412
+ * var strides = [ 6, 1 ];
1413
+ * var offset = 1;
1414
+ *
1415
+ * var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
1416
+ * // returns <ndarray>
1417
+ *
1418
+ * var opts = {
1419
+ * 'dtype': 'uint32'
1420
+ * };
1421
+ * var y = reject( x, opts, isOdd );
1422
+ * // returns <ndarray>
1423
+ *
1424
+ * var arr = ndarray2array( y );
1425
+ * // returns [ 2, 4, 8, 10 ]
1426
+ */
1427
+ declare function reject<T = unknown, V = unknown>( x: typedndarray<T>, options: Uint32Options, predicate: Predicate<T, V>, thisArg?: ThisParameterType<Predicate<T, V>> ): uint32ndarray;
1428
+
1429
+ /**
1430
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
1431
+ *
1432
+ * @param x - input ndarray
1433
+ * @param options - options
1434
+ * @param options.dtype - output ndarray data type
1435
+ * @param options.order - iteration order
1436
+ * @param predicate - predicate function
1437
+ * @param thisArg - predicate function execution context
1438
+ * @returns output ndarray
1439
+ *
1440
+ * @example
1441
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
1442
+ * var Float64Array = require( '@stdlib/array-float64' );
1443
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
1444
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
1445
+ *
1446
+ * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
1447
+ * var shape = [ 2, 3 ];
1448
+ * var strides = [ 6, 1 ];
1449
+ * var offset = 1;
1450
+ *
1451
+ * var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
1452
+ * // returns <ndarray>
1453
+ *
1454
+ * var opts = {
1455
+ * 'dtype': 'uint16'
1456
+ * };
1457
+ * var y = reject( x, opts, isOdd );
1458
+ * // returns <ndarray>
1459
+ *
1460
+ * var arr = ndarray2array( y );
1461
+ * // returns [ 2, 4, 8, 10 ]
1462
+ */
1463
+ declare function reject<T = unknown, V = unknown>( x: typedndarray<T>, options: Uint16Options, predicate: Predicate<T, V>, thisArg?: ThisParameterType<Predicate<T, V>> ): uint16ndarray;
1464
+
1465
+ /**
1466
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
1467
+ *
1468
+ * @param x - input ndarray
1469
+ * @param options - options
1470
+ * @param options.dtype - output ndarray data type
1471
+ * @param options.order - iteration order
1472
+ * @param predicate - predicate function
1473
+ * @param thisArg - predicate function execution context
1474
+ * @returns output ndarray
1475
+ *
1476
+ * @example
1477
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
1478
+ * var Float64Array = require( '@stdlib/array-float64' );
1479
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
1480
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
1481
+ *
1482
+ * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
1483
+ * var shape = [ 2, 3 ];
1484
+ * var strides = [ 6, 1 ];
1485
+ * var offset = 1;
1486
+ *
1487
+ * var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
1488
+ * // returns <ndarray>
1489
+ *
1490
+ * var opts = {
1491
+ * 'dtype': 'uint8'
1492
+ * };
1493
+ * var y = reject( x, opts, isOdd );
1494
+ * // returns <ndarray>
1495
+ *
1496
+ * var arr = ndarray2array( y );
1497
+ * // returns [ 2, 4, 8, 10 ]
1498
+ */
1499
+ declare function reject<T = unknown, V = unknown>( x: typedndarray<T>, options: Uint8Options, predicate: Predicate<T, V>, thisArg?: ThisParameterType<Predicate<T, V>> ): uint8ndarray;
1500
+
1501
+ /**
1502
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
1503
+ *
1504
+ * @param x - input ndarray
1505
+ * @param options - options
1506
+ * @param options.dtype - output ndarray data type
1507
+ * @param options.order - iteration order
1508
+ * @param predicate - predicate function
1509
+ * @param thisArg - predicate function execution context
1510
+ * @returns output ndarray
1511
+ *
1512
+ * @example
1513
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
1514
+ * var Float64Array = require( '@stdlib/array-float64' );
1515
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
1516
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
1517
+ *
1518
+ * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
1519
+ * var shape = [ 2, 3 ];
1520
+ * var strides = [ 6, 1 ];
1521
+ * var offset = 1;
1522
+ *
1523
+ * var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
1524
+ * // returns <ndarray>
1525
+ *
1526
+ * var opts = {
1527
+ * 'dtype': 'uint8c'
1528
+ * };
1529
+ * var y = reject( x, opts, isOdd );
1530
+ * // returns <ndarray>
1531
+ *
1532
+ * var arr = ndarray2array( y );
1533
+ * // returns [ 2, 4, 8, 10 ]
1534
+ */
1535
+ declare function reject<T = unknown, V = unknown>( x: typedndarray<T>, options: Uint8COptions, predicate: Predicate<T, V>, thisArg?: ThisParameterType<Predicate<T, V>> ): uint8cndarray;
1536
+
1537
+ /**
1538
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
1539
+ *
1540
+ * @param x - input ndarray
1541
+ * @param options - options
1542
+ * @param options.dtype - output ndarray data type
1543
+ * @param options.order - iteration order
1544
+ * @param predicate - predicate function
1545
+ * @param thisArg - predicate function execution context
1546
+ * @returns output ndarray
1547
+ *
1548
+ * @example
1549
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
1550
+ * var Float64Array = require( '@stdlib/array-float64' );
1551
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
1552
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
1553
+ *
1554
+ * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
1555
+ * var shape = [ 2, 3 ];
1556
+ * var strides = [ 6, 1 ];
1557
+ * var offset = 1;
1558
+ *
1559
+ * var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
1560
+ * // returns <ndarray>
1561
+ *
1562
+ * var opts = {
1563
+ * 'dtype': 'bool'
1564
+ * };
1565
+ * var y = reject( x, opts, isOdd );
1566
+ * // returns <ndarray>
1567
+ *
1568
+ * var arr = ndarray2array( y );
1569
+ * // returns [ true, true, true, true ]
1570
+ */
1571
+ declare function reject<T = unknown, V = unknown>( x: typedndarray<T>, options: BoolOptions, predicate: Predicate<T, V>, thisArg?: ThisParameterType<Predicate<T, V>> ): boolndarray;
1572
+
1573
+ /**
1574
+ * Returns a shallow copy of an ndarray containing only those elements which fail a test implemented by a predicate function.
1575
+ *
1576
+ * @param x - input ndarray
1577
+ * @param options - options
1578
+ * @param options.dtype - output ndarray data type
1579
+ * @param options.order - iteration order
1580
+ * @param predicate - predicate function
1581
+ * @param thisArg - predicate function execution context
1582
+ * @returns output ndarray
1583
+ *
1584
+ * @example
1585
+ * var isOdd = require( '@stdlib/assert-is-odd' ).isPrimitive;
1586
+ * var Float64Array = require( '@stdlib/array-float64' );
1587
+ * var ndarray = require( '@stdlib/ndarray-ctor' );
1588
+ * var ndarray2array = require( '@stdlib/ndarray-to-array' );
1589
+ *
1590
+ * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
1591
+ * var shape = [ 2, 3 ];
1592
+ * var strides = [ 6, 1 ];
1593
+ * var offset = 1;
1594
+ *
1595
+ * var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
1596
+ * // returns <ndarray>
1597
+ *
1598
+ * var opts = {
1599
+ * 'dtype': 'generic'
1600
+ * };
1601
+ * var y = reject( x, opts, isOdd );
1602
+ * // returns <ndarray>
1603
+ *
1604
+ * var arr = ndarray2array( y );
1605
+ * // returns [ 2.0, 4.0, 8.0, 10.0 ]
1606
+ */
1607
+ declare function reject<T = unknown, V = unknown>( x: typedndarray<T>, options: GenericOptions, predicate: Predicate<T, V>, thisArg?: ThisParameterType<Predicate<T, V>> ): genericndarray<T>;
1608
+
1609
+
1610
+ // EXPORTS //
1611
+
1612
+ export = reject;