@@ -70,12 +70,13 @@ Note that indexing is relative to the first index. To introduce an offset, use [
7070``` javascript
7171var Float64Array = require ( ' @stdlib/array/float64' );
7272
73- // Initial array...
73+ // Initial array:
7474var x0 = new Float64Array ( [ 0.0 , 1.0 , 2.0 , 3.0 ] );
7575
76- // Create an offset view...
76+ // Create an offset view:
7777var x1 = new Float64Array ( x0 .buffer , x0 .BYTES_PER_ELEMENT * 1 ); // start at 2nd element
7878
79+ // Output array:
7980var out = new Float64Array ( 8 );
8081
8182dcartesianSquare ( ' row-major' , 2 , x1, 1 , out, 2 );
@@ -127,7 +128,7 @@ dcartesianSquare.ndarray( 2, x, 1, 2, out, 2, 1, 0 );
127128
128129## Notes
129130
130- - For an input array ` x ` of length ` N ` , the output array ` out ` must contain at least ` N^2 * LDO ` elements.
131+ - For an input array of length ` N ` , the output array must contain at least ` N * N * 2 ` indexed elements.
131132- The ` LDO ` parameter must be greater than or equal to ` max(1,N) ` .
132133- If ` N <= 0 ` , both functions return ` out ` unchanged.
133134
@@ -285,7 +286,7 @@ int main( void ) {
285286
286287 // Print the result:
287288 for ( int i = 0; i < N*N; i++ ) {
288- printf( "out[ %i ] = ( %lf, %lf )\n", i, out[ i*2 ], out[ i*2+1 ] );
289+ printf( "out[ %i ] = ( %lf, %lf )\n", i, out[ i*2 ], out[ ( i*2) +1 ] );
289290 }
290291}
291292```
0 commit comments