Skip to content

Commit bd69126

Browse files
committed
Auto-generated commit
1 parent 65cac76 commit bd69126

File tree

6 files changed

+43
-196
lines changed

6 files changed

+43
-196
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,7 @@ A total of 40 issues were closed in this release:
702702

703703
<details>
704704

705+
- [`a5a3d29`](https://github.com/stdlib-js/stdlib/commit/a5a3d29ccbc51f322d2f8d84608411e3ebce3d11) - **docs:** improve doctests for ndarray instances in `ndarray/filter` [(#9606)](https://github.com/stdlib-js/stdlib/pull/9606) _(by Harshit Verma, Athan Reines)_
705706
- [`63e3c0c`](https://github.com/stdlib-js/stdlib/commit/63e3c0c70c31fae2111b4dfb4141a3665bc0dea0) - **test:** add tests to `ndarray/find` [(#9311)](https://github.com/stdlib-js/stdlib/pull/9311) _(by Muhammad Haris, Athan Reines, stdlib-bot)_
706707
- [`582d828`](https://github.com/stdlib-js/stdlib/commit/582d8280f7d6f077f686db7348e3132971476939) - **test:** add tests _(by Athan Reines)_
707708
- [`59c9027`](https://github.com/stdlib-js/stdlib/commit/59c90279d6241a73c8d82fd92c49f64c4f068db7) - **test:** add tests _(by Athan Reines)_
@@ -2017,7 +2018,7 @@ A total of 40 issues were closed in this release:
20172018

20182019
### Contributors
20192020

2020-
A total of 32 people contributed to this release. Thank you to the following contributors:
2021+
A total of 33 people contributed to this release. Thank you to the following contributors:
20212022

20222023
- Athan Reines
20232024
- Bhavishy Agrawal
@@ -2030,6 +2031,7 @@ A total of 32 people contributed to this release. Thank you to the following con
20302031
- Gautam Kaushik
20312032
- Geo Daoyu
20322033
- Gururaj Gurram
2034+
- Harshit Verma
20332035
- Karan Vasudevamurthy
20342036
- Kate Suraev
20352037
- Lokesh Ranjan

filter/README.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ Returns a shallow copy of an [ndarray][@stdlib/ndarray/ctor] containing only tho
4545
```javascript
4646
var Float64Array = require( '@stdlib/array/float64' );
4747
var ndarray = require( '@stdlib/ndarray/ctor' );
48-
var ndarray2array = require( '@stdlib/ndarray/to-array' );
4948

5049
function predicate( z ) {
5150
return z > 6.0;
@@ -60,10 +59,7 @@ var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );
6059
// returns <ndarray>
6160

6261
var y = filter( x, predicate );
63-
// returns <ndarray>
64-
65-
var arr = ndarray2array( y );
66-
// returns [ 8.0, 9.0, 10.0 ]
62+
// returns <ndarray>[ 8.0, 9.0, 10.0 ]
6763
```
6864

6965
The function accepts the following arguments:
@@ -86,7 +82,6 @@ By default, the output ndarray [data type][@stdlib/ndarray/dtypes] is inferred f
8682
var Float64Array = require( '@stdlib/array/float64' );
8783
var ndarray = require( '@stdlib/ndarray/ctor' );
8884
var dtype = require( '@stdlib/ndarray/dtype' );
89-
var ndarray2array = require( '@stdlib/ndarray/to-array' );
9085

9186
function predicate( z ) {
9287
return z > 6.0;
@@ -104,13 +99,10 @@ var opts = {
10499
'dtype': 'float32'
105100
};
106101
var y = filter( x, opts, predicate );
107-
// returns <ndarray>
102+
// returns <ndarray>[ 8.0, 9.0, 10.0 ]
108103

109104
var dt = dtype( y );
110105
// returns 'float32'
111-
112-
var arr = ndarray2array( y );
113-
// returns [ 8.0, 9.0, 10.0 ]
114106
```
115107

116108
To set the `predicate` function execution context, provide a `thisArg`.
@@ -120,7 +112,6 @@ To set the `predicate` function execution context, provide a `thisArg`.
120112
```javascript
121113
var Float64Array = require( '@stdlib/array/float64' );
122114
var ndarray = require( '@stdlib/ndarray/ctor' );
123-
var ndarray2array = require( '@stdlib/ndarray/to-array' );
124115

125116
function predicate( z ) {
126117
this.count += 1;
@@ -139,10 +130,7 @@ var ctx = {
139130
'count': 0
140131
};
141132
var y = filter( x, predicate, ctx );
142-
// returns <ndarray>
143-
144-
var arr = ndarray2array( y );
145-
// returns [ 8.0, 9.0, 10.0 ]
133+
// returns <ndarray>[ 8.0, 9.0, 10.0 ]
146134

147135
var count = ctx.count;
148136
// returns 6

filter/docs/repl.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@
4343
--------
4444
> var x = {{alias:@stdlib/ndarray/array}}( [ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ] );
4545
> function f( v ) { return v > 2.0; };
46-
> var y = {{alias}}( x, f );
47-
> {{alias:@stdlib/ndarray/to-array}}( y )
48-
[ 3.0, 4.0 ]
46+
> var y = {{alias}}( x, f )
47+
<ndarray>[ 3.0, 4.0 ]
4948

5049
See Also
5150
--------

0 commit comments

Comments
 (0)