Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Feb 27, 2025
1 parent 8cbea4f commit d709299
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 46 deletions.
19 changes: 16 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<section class="release" id="unreleased">

## Unreleased (2025-02-25)
## Unreleased (2025-02-27)

<section class="packages">

Expand Down Expand Up @@ -1210,6 +1210,18 @@

<!-- /.features -->

<section class="issues">

##### Closed Issues

This release closes the following issue:

[#5440](https://github.com/stdlib-js/stdlib/issues/5440)

</section>

<!-- /.issues -->

</details>

</section>
Expand Down Expand Up @@ -6105,9 +6117,9 @@ This release closes the following issue:

### Closed Issues

A total of 10 issues were closed in this release:
A total of 11 issues were closed in this release:

[#3046](https://github.com/stdlib-js/stdlib/issues/3046), [#3073](https://github.com/stdlib-js/stdlib/issues/3073), [#3074](https://github.com/stdlib-js/stdlib/issues/3074), [#3075](https://github.com/stdlib-js/stdlib/issues/3075), [#3186](https://github.com/stdlib-js/stdlib/issues/3186), [#3201](https://github.com/stdlib-js/stdlib/issues/3201), [#3253](https://github.com/stdlib-js/stdlib/issues/3253), [#5072](https://github.com/stdlib-js/stdlib/issues/5072), [#5073](https://github.com/stdlib-js/stdlib/issues/5073), [#5237](https://github.com/stdlib-js/stdlib/issues/5237)
[#3046](https://github.com/stdlib-js/stdlib/issues/3046), [#3073](https://github.com/stdlib-js/stdlib/issues/3073), [#3074](https://github.com/stdlib-js/stdlib/issues/3074), [#3075](https://github.com/stdlib-js/stdlib/issues/3075), [#3186](https://github.com/stdlib-js/stdlib/issues/3186), [#3201](https://github.com/stdlib-js/stdlib/issues/3201), [#3253](https://github.com/stdlib-js/stdlib/issues/3253), [#5072](https://github.com/stdlib-js/stdlib/issues/5072), [#5073](https://github.com/stdlib-js/stdlib/issues/5073), [#5237](https://github.com/stdlib-js/stdlib/issues/5237), [#5440](https://github.com/stdlib-js/stdlib/issues/5440)

</section>

Expand Down Expand Up @@ -6143,6 +6155,7 @@ A total of 13 people contributed to this release. Thank you to the following con

<details>

- [`8dc22d7`](https://github.com/stdlib-js/stdlib/commit/8dc22d75fe8396c5fe89418a325a174c531d95eb) - **refactor:** update `blas/base/gscal` to follow current project conventions [(#5447)](https://github.com/stdlib-js/stdlib/pull/5447) _(by Saurabh Singh, Athan Reines, Muhammad Haris, stdlib-bot)_
- [`57184e0`](https://github.com/stdlib-js/stdlib/commit/57184e03168cf78b9daeee492995a7ea2670d463) - **feat:** add accessor array support to `blas/base/gasum` [(#5439)](https://github.com/stdlib-js/stdlib/pull/5439) _(by Muhammad Haris)_
- [`2d26990`](https://github.com/stdlib-js/stdlib/commit/2d26990255c7d3ef2396f2d8c7ebf545e7ba41ee) - **docs:** update examples for `blas/base/wasm/zcopy` [(#5442)](https://github.com/stdlib-js/stdlib/pull/5442) _(by Gururaj Gurram)_
- [`3b48bb5`](https://github.com/stdlib-js/stdlib/commit/3b48bb5eb47d5a8559d8d7e82f7639ee59d90d21) - **feat:** add accessor array support to `blas/base/gscal` [(#5418)](https://github.com/stdlib-js/stdlib/pull/5418) _(by Muhammad Haris, Athan Reines)_
Expand Down
12 changes: 6 additions & 6 deletions base/gscal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.

# gscal

> Multiply a vector `x` by a constant `alpha`.
> Multiply a vector by a scalar constant.
<section class="usage">

Expand All @@ -32,7 +32,7 @@ var gscal = require( '@stdlib/blas/base/gscal' );

#### gscal( N, alpha, x, stride )

Multiplies a vector `x` by a constant `alpha`.
Multiplies a vector by a scalar constant.

```javascript
var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];
Expand All @@ -46,9 +46,9 @@ The function has the following parameters:
- **N**: number of indexed elements.
- **alpha**: scalar constant.
- **x**: input [`Array`][mdn-array] or [`typed array`][mdn-typed-array].
- **stride**: index increment.
- **stride**: stride length.

The `N` and `stride` parameters determine which elements in `x` are accessed at runtime. For example, to multiply every other value by a constant
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to multiply every other value by a scalar constant:

```javascript
var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];
Expand Down Expand Up @@ -77,7 +77,7 @@ If either `N` or `stride` is less than or equal to `0`, the function returns `x`

#### gscal.ndarray( N, alpha, x, stride, offset )

Multiplies a vector `x` by a constant `alpha` using alternative indexing semantics.
Multiplies a vector by a scalar constant using alternative indexing semantics.

```javascript
var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];
Expand All @@ -90,7 +90,7 @@ The function has the following additional parameters:

- **offset**: starting index.

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 multiply the last three elements of `x` by a constant
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 multiply the last three elements:

```javascript
var x = [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ];
Expand Down
48 changes: 24 additions & 24 deletions base/gscal/docs/repl.txt
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@

{{alias}}( N, alpha, x, stride )
Multiplies a vector `x` by a constant `alpha`.
{{alias}}( N, alpha, x, strideX )
Multiplies a vector by a scalar constant.

The `N` and `stride` parameters determine which elements in `x` are accessed
at runtime.
The `N` and stride parameters determine which elements in the strided array
are accessed at runtime.

Indexing is relative to the first index. To introduce an offset, use typed
array views.

If `N <= 0` or `stride <= 0`, the function returns `x` unchanged.
If `N <= 0`, the function returns `x` unchanged.

Parameters
----------
N: integer
Number of indexed elements.

alpha: number
Constant.
Scalar constant.

x: Array<number>|TypedArray
Input array.

stride: integer
Index increment for `x`.
strideX: integer
Stride length.

Returns
-------
Expand All @@ -32,12 +32,11 @@
Examples
--------
// Standard Usage:
> var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, -1.0, -3.0 ];
> var alpha = 5.0;
> {{alias}}( x.length, alpha, x, 1 )
[ -10.0, 5.0, 15.0, -25.0, 20.0, -5.0, -15.0 ]
> var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];
> {{alias}}( x.length, 5.0, x, 1 )
[ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]

// Using `N` and `stride` parameters:
// Using `N` and stride parameters:
> x = [ -2.0, 1.0, 3.0, -5.0, 4.0, -1.0, -3.0 ];
> {{alias}}( 3, 5.0, x, 2 )
[ -10.0, 1.0, 15.0, -5.0, 20.0, -1.0, -3.0 ]
Expand All @@ -51,29 +50,30 @@
<Float64Array>[ 1.0, -10.0, 3.0, -20.0, 5.0, -30.0 ]


{{alias}}.ndarray( N, alpha, x, stride, offset )
Multiplies `x` by a constant `alpha` using alternative indexing semantics.
{{alias}}.ndarray( N, alpha, x, strideX, offsetX )
Multiplies a vector by a scalar constant using alternative indexing
semantics.

While typed array views mandate a view offset based on the underlying
buffer, the `offset` parameter supports indexing semantics based on a
starting index.
buffer, the offset parameter supports indexing semantics based on a starting
index.

Parameters
----------
N: integer
Number of indexed elements.

alpha: number
Constant.
Scalar constant.

x: Array<number>|TypedArray
Input array.

stride: integer
Index increment for `x`.
strideX: integer
Stride length.

offset: integer
Starting index of `x`.
offsetX: integer
Starting index.

Returns
-------
Expand All @@ -83,9 +83,9 @@
Examples
--------
// Standard Usage:
> var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, -1.0, -3.0 ];
> var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];
> {{alias}}.ndarray( x.length, 5.0, x, 1, 0 )
[ -10.0, 5.0, 15.0, -25.0, 20.0, -5.0, -15.0 ]
[ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]

// Using an index offset:
> x = [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ];
Expand Down
12 changes: 6 additions & 6 deletions base/gscal/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ type InputArray = NumericArray | Collection<number> | AccessorArrayLike<number>;
*/
interface Routine {
/**
* Multiplies a vector `x` by a constant `alpha`.
* Multiplies a vector by a scalar constant.
*
* @param N - number of indexed elements
* @param alpha - constant
* @param alpha - scalar constant
* @param x - input array
* @param stride - stride length
* @returns input array
Expand All @@ -49,10 +49,10 @@ interface Routine {
<T extends InputArray>( N: number, alpha: number, x: T, stride: number ): T;

/**
* Multiplies a vector `x` by a constant `alpha` using alternative indexing semantics.
* Multiplies a vector by a scalar constant using alternative indexing semantics.
*
* @param N - number of indexed elements
* @param alpha - constant
* @param alpha - scalar constant
* @param x - input array
* @param stride - stride length
* @param offset - starting index
Expand All @@ -68,10 +68,10 @@ interface Routine {
}

/**
* Multiplies a vector `x` by a constant `alpha`.
* Multiplies a vector by a scalar constant.
*
* @param N - number of indexed elements
* @param alpha - constant
* @param alpha - scalar constant
* @param x - input array
* @param stride - stride length
* @returns input array
Expand Down
2 changes: 1 addition & 1 deletion base/gscal/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'use strict';

/**
* BLAS level 1 routine to multiply `x` by a constant.
* Multiply a vector by a scalar constant.
*
* @module @stdlib/blas/base/gscal
*
Expand Down
6 changes: 3 additions & 3 deletions base/gscal/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ var ndarray = require( './ndarray.js' );
// MAIN //

/**
* Multiplies `x` by a scalar `alpha`.
* Multiplies a vector by a scalar constant.
*
* @param {PositiveInteger} N - number of indexed elements
* @param {number} alpha - scalar
* @param {number} alpha - scalar constant
* @param {NumericArray} x - input array
* @param {PositiveInteger} stride - index increment
* @param {PositiveInteger} stride - stride length
* @returns {NumericArray} input array
*
* @example
Expand Down
4 changes: 2 additions & 2 deletions base/gscal/lib/ndarray.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ var M = 5;
// MAIN //

/**
* Multiplies `x` by a scalar `alpha`.
* Multiplies a vector by a scalar constant using alternative indexing semantics.
*
* @param {PositiveInteger} N - number of indexed elements
* @param {number} alpha - scalar
* @param {NumericArray} x - input array
* @param {integer} stride - index increment
* @param {integer} stride - stride length
* @param {NonNegativeInteger} offset - starting index
* @returns {NumericArray} input array
*
Expand Down
2 changes: 1 addition & 1 deletion base/gscal/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/blas/base/gscal",
"version": "0.0.0",
"description": "Multiply a vector by a constant.",
"description": "Multiply a vector by a scalar constant.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down

0 comments on commit d709299

Please sign in to comment.