@@ -92,9 +92,6 @@ var floor = require( '@stdlib/math/base/special/floor' );
9292
9393var x0 = new Float64Array ( [ 2.0 , 1.0 , 2.0 , - 2.0 , - 2.0 , 2.0 , 3.0 , 4.0 , NaN ] );
9494var x1 = new Float64Array ( x0 .buffer , x0 .BYTES_PER_ELEMENT * 1 ); // start at 2nd element
95-
96- var v = dnanmeanwd ( 5 , x1, 2 );
97- // returns 1.25
9895```
9996
10097#### dnanmeanwd.ndarray( N, x, strideX, offsetX )
@@ -120,9 +117,6 @@ While [`typed array`][mdn-typed-array] views mandate a view offset based on the
120117var Float64Array = require ( ' @stdlib/array/float64' );
121118
122119var x = new Float64Array ( [ 2.0 , 1.0 , 2.0 , - 2.0 , - 2.0 , 2.0 , 3.0 , 4.0 , NaN ] );
123-
124- var v = dnanmeanwd .ndarray ( 5 , x, 2 , 1 );
125- // returns 1.25
126120```
127121
128122</section >
@@ -211,6 +205,7 @@ double v = stdlib_strided_dnanmeanwd( 5, x, 1 );
211205```
212206
213207The function accepts the following arguments:
208+
214209- **N**: `[in] CBLAS_INT` number of indexed elements.
215210- **X**: `[in] double*` input array.
216211- **strideX**: `[in] CBLAS_INT` stride length for `X`.
@@ -231,6 +226,7 @@ double v = stdlib_strided_dnanmeanwd_ndarray( 5, x, 1, 0 );
231226```
232227
233228The function accepts the following arguments:
229+
234230- **N**: `[in] CBLAS_INT` number of indexed elements.
235231- **X**: `[in] double*` input array.
236232- **strideX**: `[in] CBLAS_INT` stride length for `X`.
@@ -264,19 +260,19 @@ double stdlib_strided_dnanmeanwd_ndarray( const CBLAS_INT N, const double *X, co
264260
265261int main ( void ) {
266262 // Create a strided array:
267- const double x[ ] = { 1.0, 2.0, 0.0/0.0, 3.0, 0.0/0.0, 4.0, 5.0, 6.0, 0.0/0.0, 7.0, 8.0, 0.0/0.0 };
263+ const double x[ ] = { 1.0, 2.0, 0.0/0.0, 3.0, 0.0/0.0, 4.0, 5.0, 6.0, 0.0/0.0, 7.0, 8.0, 0.0/0.0 };
268264
269- // Specify the number of elements:
270- const int N = 6;
265+ // Specify the number of elements:
266+ const int N = 6;
271267
272- // Specify the stride length:
273- const int strideX = 2;
268+ // Specify the stride length:
269+ const int strideX = 2;
274270
275- // Compute the arithmetic mean:
276- double v = stdlib_strided_dnanmeanwd( N, x, strideX );
271+ // Compute the arithmetic mean:
272+ double v = stdlib_strided_dnanmeanwd( N, x, strideX );
277273
278- // Print the result:
279- printf( "mean: %lf\n", v );
274+ // Print the result:
275+ printf( "mean: %lf\n", v );
280276}
281277```
282278
0 commit comments