Skip to content

Commit efe6e5d

Browse files
committed
docs: add comment
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 3e38e26 commit efe6e5d

File tree

1 file changed

+20
-0
lines changed
  • lib/node_modules/@stdlib/array/typed/test

1 file changed

+20
-0
lines changed

lib/node_modules/@stdlib/array/typed/test/test.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,8 @@ tape( 'the function returns a typed array (default, complex typed array)', funct
809809
var out;
810810

811811
arr = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] );
812+
813+
// Note: this is effectively a reinterpretation of the complex number array as an array of interleaved real and imaginary components
812814
out = typedarray( arr );
813815
t.strictEqual( instanceOf( out, Float64Array ), true, 'returns expected value' );
814816
t.strictEqual( out.length, 4, 'returns expected value' );
@@ -828,6 +830,8 @@ tape( 'the function returns a typed array (dtype=float64, complex typed array)',
828830
var out;
829831

830832
arr = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] );
833+
834+
// Note: this is effectively a reinterpretation of the complex number array as an array of interleaved real and imaginary components
831835
out = typedarray( arr, 'float64' );
832836
t.strictEqual( instanceOf( out, Float64Array ), true, 'returns expected value' );
833837
t.strictEqual( out.length, 4, 'returns expected value' );
@@ -847,6 +851,8 @@ tape( 'the function returns a typed array (dtype=float32, complex typed array)',
847851
var out;
848852

849853
arr = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
854+
855+
// Note: this is effectively a reinterpretation of the complex number array as an array of interleaved real and imaginary components
850856
out = typedarray( arr, 'float32' );
851857
t.strictEqual( instanceOf( out, Float32Array ), true, 'returns expected value' );
852858
t.strictEqual( out.length, 4, 'returns expected value' );
@@ -908,6 +914,8 @@ tape( 'the function returns a typed array (dtype=int32, complex typed array)', f
908914
var out;
909915

910916
arr = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] );
917+
918+
// Note: this is effectively a reinterpretation of the complex number array as an array of interleaved real and imaginary components
911919
out = typedarray( arr, 'int32' );
912920
t.strictEqual( instanceOf( out, Int32Array ), true, 'returns expected value' );
913921
t.strictEqual( out.length, 4, 'returns expected value' );
@@ -927,6 +935,8 @@ tape( 'the function returns a typed array (dtype=int16, complex typed array)', f
927935
var out;
928936

929937
arr = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] );
938+
939+
// Note: this is effectively a reinterpretation of the complex number array as an array of interleaved real and imaginary components
930940
out = typedarray( arr, 'int16' );
931941
t.strictEqual( instanceOf( out, Int16Array ), true, 'returns expected value' );
932942
t.strictEqual( out.length, 4, 'returns expected value' );
@@ -946,6 +956,8 @@ tape( 'the function returns a typed array (dtype=int8, complex typed array)', fu
946956
var out;
947957

948958
arr = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] );
959+
960+
// Note: this is effectively a reinterpretation of the complex number array as an array of interleaved real and imaginary components
949961
out = typedarray( arr, 'int8' );
950962
t.strictEqual( instanceOf( out, Int8Array ), true, 'returns expected value' );
951963
t.strictEqual( out.length, 4, 'returns expected value' );
@@ -965,6 +977,8 @@ tape( 'the function returns a typed array (dtype=uint32, complex typed array)',
965977
var out;
966978

967979
arr = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] );
980+
981+
// Note: this is effectively a reinterpretation of the complex number array as an array of interleaved real and imaginary components
968982
out = typedarray( arr, 'uint32' );
969983
t.strictEqual( instanceOf( out, Uint32Array ), true, 'returns expected value' );
970984
t.strictEqual( out.length, 4, 'returns expected value' );
@@ -984,6 +998,8 @@ tape( 'the function returns a typed array (dtype=uint16, complex typed array)',
984998
var out;
985999

9861000
arr = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] );
1001+
1002+
// Note: this is effectively a reinterpretation of the complex number array as an array of interleaved real and imaginary components
9871003
out = typedarray( arr, 'uint16' );
9881004
t.strictEqual( instanceOf( out, Uint16Array ), true, 'returns expected value' );
9891005
t.strictEqual( out.length, 4, 'returns expected value' );
@@ -1003,6 +1019,8 @@ tape( 'the function returns a typed array (dtype=uint8, complex typed array)', f
10031019
var out;
10041020

10051021
arr = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] );
1022+
1023+
// Note: this is effectively a reinterpretation of the complex number array as an array of interleaved real and imaginary components
10061024
out = typedarray( arr, 'uint8' );
10071025
t.strictEqual( instanceOf( out, Uint8Array ), true, 'returns expected value' );
10081026
t.strictEqual( out.length, 4, 'returns expected value' );
@@ -1022,6 +1040,8 @@ tape( 'the function returns a typed array (dtype=uint8c, complex typed array)',
10221040
var out;
10231041

10241042
arr = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] );
1043+
1044+
// Note: this is effectively a reinterpretation of the complex number array as an array of interleaved real and imaginary components
10251045
out = typedarray( arr, 'uint8c' );
10261046
t.strictEqual( instanceOf( out, Uint8ClampedArray ), true, 'returns expected value' );
10271047
t.strictEqual( out.length, 4, 'returns expected value' );

0 commit comments

Comments
 (0)