Skip to content

Commit 11fe978

Browse files
Planeshifterkgryte
andauthored
chore: minor clean-up
PR-URL: #11694 Co-authored-by: Athan Reines <kgryte@gmail.com> Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent bad4f4c commit 11fe978

5 files changed

Lines changed: 37 additions & 34 deletions

File tree

lib/node_modules/@stdlib/blas/base/cgemv/lib/base.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ function cgemv( trans, M, N, alpha, A, strideA1, strideA2, offsetA, x, strideX,
143143

144144
// y = beta*y
145145
if ( rebeta === 0.0 && imbeta === 0.0 ) {
146-
cfill( ylen, alpha, y, strideY, offsetY );
146+
cfill( ylen, beta, y, strideY, offsetY );
147147
} else if ( rebeta !== 1.0 || imbeta !== 0.0 ) {
148148
cscal( ylen, beta, y, strideY, offsetY );
149149
}
@@ -160,8 +160,8 @@ function cgemv( trans, M, N, alpha, A, strideA1, strideA2, offsetA, x, strideX,
160160
sign = 1;
161161
}
162162
oa = offsetA * 2;
163-
sa1 = strideA1 *2;
164-
sa2 = strideA2 *2;
163+
sa1 = strideA1 * 2;
164+
sa2 = strideA2 * 2;
165165
ox = offsetX * 2;
166166
oy = offsetY * 2;
167167
sx = strideX * 2;

lib/node_modules/@stdlib/blas/base/cgemv/lib/ndarray.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ var isMatrixTranspose = require( '@stdlib/blas/base/assert/is-transpose-operatio
2424
var format = require( '@stdlib/string/format' );
2525
var base = require( './base.js' );
2626

27+
28+
// MAIN //
29+
2730
/**
2831
* Performs one of the matrix-vector operations `y = α*A*x + β*y` or `y = α*A^T*x + β*y` or `y = α*A^H*x + β*y`, where `α` and `β` are scalars, `x` and `y` are vectors, and `A` is an `M` by `N` matrix.
2932
*

lib/node_modules/@stdlib/blas/ext/base/ddiff/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ The function has the following parameters:
6868
- **workspace**: workspace [`Float64Array`][@stdlib/array/float64]. Must have `N + N1 + N2 - 1` elements.
6969
- **strideW**: stride length for `workspace`.
7070

71-
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to differences of every other element:
71+
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to compute differences of every other element:
7272

7373
```javascript
7474
var Float64Array = require( '@stdlib/array/float64' );

lib/node_modules/@stdlib/napi/argv-booleanarray/lib/native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var addon = require( './../src/addon.node' );
3232
*
3333
* @private
3434
* @param {BooleanArray} v - input array
35-
* @returns {Uint8Array} input array
35+
* @returns {BooleanArray} input array
3636
*
3737
* @example
3838
* var BooleanArray = require( '@stdlib/array/bool' );

lib/node_modules/@stdlib/stats/base/ndarray/dmaxsorted/README.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -192,46 +192,46 @@ int main( void ) {
192192
// Create a sorted data buffer (ascending):
193193
const double data[] = { -8.0, -6.0, -4.0, -2.0, 1.0, 3.0, 5.0, 7.0 };
194194

195-
// Specify the number of array dimensions:
196-
const int64_t ndims = 1;
195+
// Specify the number of array dimensions:
196+
const int64_t ndims = 1;
197197

198-
// Specify the array shape:
199-
int64_t shape[] = { 4 };
198+
// Specify the array shape:
199+
int64_t shape[] = { 4 };
200200

201-
// Specify the array strides:
202-
int64_t strides[] = { 2*STDLIB_NDARRAY_FLOAT64_BYTES_PER_ELEMENT };
201+
// Specify the array strides:
202+
int64_t strides[] = { 2*STDLIB_NDARRAY_FLOAT64_BYTES_PER_ELEMENT };
203203

204-
// Specify the byte offset:
205-
const int64_t offset = 0;
204+
// Specify the byte offset:
205+
const int64_t offset = 0;
206206

207-
// Specify the array order:
208-
const enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR;
207+
// Specify the array order:
208+
const enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR;
209209

210-
// Specify the index mode:
211-
const enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR;
210+
// Specify the index mode:
211+
const enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR;
212212

213-
// Specify the subscript index modes:
214-
int8_t submodes[] = { STDLIB_NDARRAY_INDEX_ERROR };
215-
const int64_t nsubmodes = 1;
213+
// Specify the subscript index modes:
214+
int8_t submodes[] = { STDLIB_NDARRAY_INDEX_ERROR };
215+
const int64_t nsubmodes = 1;
216216

217-
// Create an ndarray:
218-
struct ndarray *x = stdlib_ndarray_allocate( STDLIB_NDARRAY_FLOAT64, (uint8_t *)data, ndims, shape, strides, offset, order, imode, nsubmodes, submodes );
219-
if ( x == NULL ) {
220-
fprintf( stderr, "Error allocating memory.\n" );
221-
exit( 1 );
222-
}
217+
// Create an ndarray:
218+
struct ndarray *x = stdlib_ndarray_allocate( STDLIB_NDARRAY_FLOAT64, (uint8_t *)data, ndims, shape, strides, offset, order, imode, nsubmodes, submodes );
219+
if ( x == NULL ) {
220+
fprintf( stderr, "Error allocating memory.\n" );
221+
exit( 1 );
222+
}
223223

224-
// Define a list of ndarrays:
225-
const struct ndarray *arrays[] = { x };
224+
// Define a list of ndarrays:
225+
const struct ndarray *arrays[] = { x };
226226

227-
// Compute the maximum value:
228-
double v = stdlib_stats_dmaxsorted( arrays );
227+
// Compute the maximum value:
228+
double v = stdlib_stats_dmaxsorted( arrays );
229229

230-
// Print the result:
231-
printf( "max: %lf\n", v );
230+
// Print the result:
231+
printf( "max: %lf\n", v );
232232

233-
// Free allocated memory:
234-
stdlib_ndarray_free( x );
233+
// Free allocated memory:
234+
stdlib_ndarray_free( x );
235235
}
236236
```
237237

0 commit comments

Comments
 (0)