-
-
Notifications
You must be signed in to change notification settings - Fork 1k
docs: improve doctests for complex number instances in strided/base/zmap
#9044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,13 +64,7 @@ interface Routine { | |
| * zmap( x.length, x, 1, y, 1, scale ); | ||
| * | ||
| * var v = y.get( 0 ); | ||
| * // returns <Complex128> | ||
| * | ||
| * var re = real( v ); | ||
| * // returns 10.0 | ||
| * | ||
| * var im = imag( v ); | ||
| * // returns 10.0 | ||
| * // returns <Complex128>[ 10.0, 10.0 ] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @prajjwalbajpai You need to remove any applicable import statements in this and other examples in this file. |
||
| */ | ||
| ( N: number, x: Complex128Array, strideX: number, y: Complex128Array, strideY: number, fcn: Unary ): Complex128Array; | ||
|
|
||
|
|
@@ -105,13 +99,7 @@ interface Routine { | |
| * zmap.ndarray( x.length, x, 1, 0, y, 1, 0, scale ); | ||
| * | ||
| * var v = y.get( 0 ); | ||
| * // returns <Complex128> | ||
| * | ||
| * var re = real( v ); | ||
| * // returns 10.0 | ||
| * | ||
| * var im = imag( v ); | ||
| * // returns 10.0 | ||
| * // returns <Complex128>[ 10.0, 10.0 ] | ||
| */ | ||
| ndarray( N: number, x: Complex128Array, strideX: number, offsetX: number, y: Complex128Array, strideY: number, offsetY: number, fcn: Unary ): Complex128Array; | ||
| } | ||
|
|
@@ -145,13 +133,7 @@ interface Routine { | |
| * zmap( x.length, x, 1, y, 1, scale ); | ||
| * | ||
| * var v = y.get( 0 ); | ||
| * // returns <Complex128> | ||
| * | ||
| * var re = real( v ); | ||
| * // returns 10.0 | ||
| * | ||
| * var im = imag( v ); | ||
| * // returns 10.0 | ||
| * // returns <Complex128>[ 10.0, 10.0 ] | ||
| * | ||
| * @example | ||
| * var Complex128Array = require( '@stdlib/array/complex128' ); | ||
|
|
@@ -171,13 +153,7 @@ interface Routine { | |
| * zmap.ndarray( x.length, x, 1, 0, y, 1, 0, scale ); | ||
| * | ||
| * var v = y.get( 0 ); | ||
| * // returns <Complex128> | ||
| * | ||
| * var re = real( v ); | ||
| * // returns 10.0 | ||
| * | ||
| * var im = imag( v ); | ||
| * // returns 10.0 | ||
| * // returns <Complex128>[ 10.0, 10.0 ] | ||
| */ | ||
| declare var zmap: Routine; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,13 +42,7 @@ | |
| * zmap( x.length, x, 1, y, 1, scale ); | ||
| * | ||
| * var v = y.get( 0 ); | ||
| * // returns <Complex128> | ||
| * | ||
| * var re = real( v ); | ||
| * // returns 10.0 | ||
| * | ||
| * var im = imag( v ); | ||
| * // returns 10.0 | ||
| * // returns <Complex128>[ 10.0, 10.0 ] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @prajjwalbajpai You need to remove any applicable import statements in this and other examples in this file. |
||
| * | ||
| * @example | ||
| * var Complex128Array = require( '@stdlib/array/complex128' ); | ||
|
|
@@ -69,13 +63,7 @@ | |
| * zmap.ndarray( x.length, x, 1, 0, y, 1, 0, scale ); | ||
| * | ||
| * var v = y.get( 0 ); | ||
| * // returns <Complex128> | ||
| * | ||
| * var re = real( v ); | ||
| * // returns 10.0 | ||
| * | ||
| * var im = imag( v ); | ||
| * // returns 10.0 | ||
| * // returns <Complex128>[ 10.0, 10.0 ] | ||
| */ | ||
|
|
||
| // MODULES // | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,13 +55,7 @@ var ndarray = require( './ndarray.js' ); | |
| * zmap( x.length, x, 1, y, 1, scale ); | ||
| * | ||
| * var v = y.get( 0 ); | ||
| * // returns <Complex128> | ||
| * | ||
| * var re = real( v ); | ||
| * // returns 10.0 | ||
| * | ||
| * var im = imag( v ); | ||
| * // returns 10.0 | ||
| * // returns <Complex128>[ 10.0, 10.0 ] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @prajjwalbajpai You need to remove any applicable import statements in this and other examples in this file. |
||
| */ | ||
| function zmap( N, x, strideX, y, strideY, fcn ) { | ||
| return ndarray( N, x, strideX, stride2offset( N, strideX ), y, strideY, stride2offset( N, strideY ), fcn ); // eslint-disable-line max-len | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,13 +51,7 @@ | |
| * zmap( x.length, x, 1, 0, y, 1, 0, scale ); | ||
| * | ||
| * var v = y.get( 0 ); | ||
| * // returns <Complex128> | ||
| * | ||
| * var re = real( v ); | ||
| * // returns 10.0 | ||
| * | ||
| * var im = imag( v ); | ||
| * // returns 10.0 | ||
| * // returns <Complex128>[ 10.0, 10.0 ] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @prajjwalbajpai You need to remove any applicable import statements in this and other examples in this file. |
||
| */ | ||
| function zmap( N, x, strideX, offsetX, y, strideY, offsetY, fcn ) { | ||
| var ix; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prajjwalbajpai You also need to remove any applicable import statements above and below in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there way to rewrite scale function without using
realandimagfunction or should I leave it as it is?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should leave as is.