Skip to content

Commit b7f05ba

Browse files
authored
docs: fix errors in examples and docs for stats/base/dmin
PR-URL: #4367 Reviewed-by: Athan Reines <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]>
1 parent c658cb7 commit b7f05ba

File tree

1 file changed

+5
-5
lines changed
  • lib/node_modules/@stdlib/stats/base/dmin

1 file changed

+5
-5
lines changed

lib/node_modules/@stdlib/stats/base/dmin/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ var v = dmin.ndarray( x.length, x, 1, 0 );
9595

9696
The function has the following additional parameters:
9797

98-
- **offset**: starting index for `x`.
98+
- **offsetX**: starting index for `x`.
9999

100100
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to calculate the minimum value for every other element in `x` starting from the second element
101101

@@ -160,7 +160,7 @@ console.log( v );
160160
Computes the minimum value of a double-precision floating-point strided array.
161161

162162
```c
163-
const double x[] = { 1.0, -2.0, 2 };
163+
const double x[] = { 1.0, -2.0, 2.0 };
164164

165165
double v = stdlib_strided_dmin( 3, x, 2 );
166166
// returns -2.0
@@ -181,7 +181,7 @@ double stdlib_strided_dmin( const CBLAS_INT N, const double *X, const CBLAS_INT
181181
Computes the minimum value of a double-precision floating-point strided array using alternative indexing semantics.
182182

183183
```c
184-
const double x[] = { 1.0, -2.0, 2 };
184+
const double x[] = { 1.0, -2.0, 2.0 };
185185

186186
double v = stdlib_strided_dmin_ndarray( 3, x, 2, 0 );
187187
// returns -2.0
@@ -229,10 +229,10 @@ int main( void ) {
229229
const int N = 4;
230230

231231
// Specify the stride length:
232-
const int stride = 2;
232+
const int strideX = 2;
233233

234234
// Compute the minimum value:
235-
double v = stdlib_strided_dmin( N, x, stride );
235+
double v = stdlib_strided_dmin( N, x, strideX );
236236

237237
// Print the result:
238238
printf( "min: %lf\n", v );

0 commit comments

Comments
 (0)