Skip to content

Commit e2c03c0

Browse files
aryan7071kgryte
andauthored
docs: improve doctests for complex number instances in ndarray/base/unary
PR-URL: #8999 Ref: #8641 Co-authored-by: Athan Reines <kgryte@gmail.com> Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent 51f5eea commit e2c03c0

21 files changed

+21
-126
lines changed

lib/node_modules/@stdlib/ndarray/base/unary/lib/0d_accessors.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,7 @@
101101
* unary0d( x, y, scale );
102102
*
103103
* var v = y.data.get( 0 );
104-
*
105-
* var re = realf( v );
106-
* // returns 30.0
107-
*
108-
* var im = imagf( v );
109-
* // returns 40.0
104+
* // returns <Complex64>[ 30.0, 40.0 ]
110105
*/
111106
function unary0d( x, y, fcn ) {
112107
y.accessors[ 1 ]( y.data, y.offset, fcn( x.accessors[ 0 ]( x.data, x.offset ) ) ); // eslint-disable-line max-len

lib/node_modules/@stdlib/ndarray/base/unary/lib/10d_accessors.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,7 @@
104104
* unary10d( x, y, true, scale );
105105
*
106106
* var v = y.data.get( 0 );
107-
*
108-
* var re = realf( v );
109-
* // returns 10.0
110-
*
111-
* var im = imagf( v );
112-
* // returns 20.0
107+
* // returns <Complex64>[ 10.0, 20.0 ]
113108
*/
114109
function unary10d( x, y, isRowMajor, fcn ) { // eslint-disable-line max-statements
115110
var xbuf;

lib/node_modules/@stdlib/ndarray/base/unary/lib/10d_blocked_accessors.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,7 @@ var blockSize = require( '@stdlib/ndarray/base/unary-tiling-block-size' );
108108
* blockedunary10d( x, y, scale );
109109
*
110110
* var v = y.data.get( 0 );
111-
*
112-
* var re = realf( v );
113-
* // returns 10.0
114-
*
115-
* var im = imagf( v );
116-
* // returns 20.0
111+
* // returns <Complex64>[ 10.0, 20.0 ]
117112
*/
118113
function blockedunary10d( x, y, fcn ) { // eslint-disable-line max-statements, max-lines-per-function
119114
var bsize;

lib/node_modules/@stdlib/ndarray/base/unary/lib/1d_accessors.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,7 @@
101101
* unary1d( x, y, scale );
102102
*
103103
* var v = y.data.get( 0 );
104-
*
105-
* var re = realf( v );
106-
* // returns 10.0
107-
*
108-
* var im = imagf( v );
109-
* // returns 20.0
104+
* // returns <Complex64>[ 10.0, 20.0 ]
110105
*/
111106
function unary1d( x, y, fcn ) {
112107
var xbuf;

lib/node_modules/@stdlib/ndarray/base/unary/lib/2d_accessors.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,7 @@
102102
* unary2d( x, y, true, scale );
103103
*
104104
* var v = y.data.get( 0 );
105-
*
106-
* var re = realf( v );
107-
* // returns 10.0
108-
*
109-
* var im = imagf( v );
110-
* // returns 20.0
105+
* // returns <Complex64>[ 10.0, 20.0 ]
111106
*/
112107
function unary2d( x, y, isRowMajor, fcn ) {
113108
var xbuf;

lib/node_modules/@stdlib/ndarray/base/unary/lib/2d_blocked_accessors.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,7 @@ var blockSize = require( '@stdlib/ndarray/base/unary-tiling-block-size' );
106106
* blockedunary2d( x, y, scale );
107107
*
108108
* var v = y.data.get( 0 );
109-
*
110-
* var re = realf( v );
111-
* // returns 10.0
112-
*
113-
* var im = imagf( v );
114-
* // returns 20.0
109+
* // returns <Complex64>[ 10.0, 20.0 ]
115110
*/
116111
function blockedunary2d( x, y, fcn ) {
117112
var bsize;

lib/node_modules/@stdlib/ndarray/base/unary/lib/3d_accessors.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,7 @@
102102
* unary3d( x, y, true, scale );
103103
*
104104
* var v = y.data.get( 0 );
105-
*
106-
* var re = realf( v );
107-
* // returns 10.0
108-
*
109-
* var im = imagf( v );
110-
* // returns 20.0
105+
* // returns <Complex64>[ 10.0, 20.0 ]
111106
*/
112107
function unary3d( x, y, isRowMajor, fcn ) {
113108
var xbuf;

lib/node_modules/@stdlib/ndarray/base/unary/lib/3d_blocked_accessors.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,7 @@ var blockSize = require( '@stdlib/ndarray/base/unary-tiling-block-size' );
108108
* blockedunary3d( x, y, scale );
109109
*
110110
* var v = y.data.get( 0 );
111-
*
112-
* var re = realf( v );
113-
* // returns 10.0
114-
*
115-
* var im = imagf( v );
116-
* // returns 20.0
111+
* // returns <Complex64>[ 10.0, 20.0 ]
117112
*/
118113
function blockedunary3d( x, y, fcn ) {
119114
var bsize;

lib/node_modules/@stdlib/ndarray/base/unary/lib/4d_accessors.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,7 @@
102102
* unary4d( x, y, true, scale );
103103
*
104104
* var v = y.data.get( 0 );
105-
*
106-
* var re = realf( v );
107-
* // returns 10.0
108-
*
109-
* var im = imagf( v );
110-
* // returns 20.0
105+
* // returns <Complex64>[ 10.0, 20.0 ]
111106
*/
112107
function unary4d( x, y, isRowMajor, fcn ) {
113108
var xbuf;

lib/node_modules/@stdlib/ndarray/base/unary/lib/4d_blocked_accessors.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,7 @@ var blockSize = require( '@stdlib/ndarray/base/unary-tiling-block-size' );
108108
* blockedunary4d( x, y, scale );
109109
*
110110
* var v = y.data.get( 0 );
111-
*
112-
* var re = realf( v );
113-
* // returns 10.0
114-
*
115-
* var im = imagf( v );
116-
* // returns 20.0
111+
* // returns <Complex64>[ 10.0, 20.0 ]
117112
*/
118113
function blockedunary4d( x, y, fcn ) { // eslint-disable-line max-statements
119114
var bsize;

0 commit comments

Comments
 (0)