Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into 4991
Browse files Browse the repository at this point in the history
  • Loading branch information
MunishMummadi committed Feb 2, 2025
2 parents 1f6ba48 + 5440f30 commit f150775
Show file tree
Hide file tree
Showing 118 changed files with 1,926 additions and 1,163 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/lint_random_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -402,20 +402,20 @@ jobs:
BODY_FILE="$GITHUB_WORKSPACE/lint_issue_body.md"
cat << EOF > "$BODY_FILE"
## C Linting Failures
## C Linting Failures
Linting failures were detected in the automated lint workflow run.
Linting failures were detected in the automated lint workflow run.
### Workflow Details
- Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- Type: C Linting
- Date: $(date -u +"%Y-%m-%d %H:%M:%S UTC")
### Workflow Details
- Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- Type: C Linting
- Date: $(date -u +"%Y-%m-%d %H:%M:%S UTC")
### Error Details
\`\`\`
$(grep -B 1 -A 2 "style:\|warning:\|error:" <<< "${{ steps.lint-c.outputs.stderr }}")
\`\`\`
EOF
### Error Details
\`\`\`
$(grep -B 1 -A 2 "style:\|warning:\|error:" <<< "${{ steps.lint-c.outputs.stderr }}")
\`\`\`
EOF
. "$GITHUB_WORKSPACE/.github/workflows/scripts/create_sub_issue" \
'Fix C lint errors' \
Expand Down
110 changes: 10 additions & 100 deletions lib/node_modules/@stdlib/blas/base/cswap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,13 @@ Interchanges two complex single-precision floating-point vectors.

```javascript
var Complex64Array = require( '@stdlib/array/complex64' );
var realf = require( '@stdlib/complex/float32/real' );
var imagf = require( '@stdlib/complex/float32/imag' );

var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );

cswap( x.length, x, 1, y, 1 );

var z = y.get( 0 );
// returns <Complex64>

var re = realf( z );
// returns 1.0

var im = imagf( z );
// returns 2.0

z = x.get( 0 );
// returns <Complex64>

re = realf( z );
// returns 0.0

im = imagf( z );
// returns 0.0
// x => <Complex64Array>[ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]
// y => <Complex64Array>[ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ]
```

The function has the following parameters:
Expand All @@ -75,31 +57,13 @@ The `N` and stride parameters determine how values from `x` are interchanged wit

```javascript
var Complex64Array = require( '@stdlib/array/complex64' );
var realf = require( '@stdlib/complex/float32/real' );
var imagf = require( '@stdlib/complex/float32/imag' );

var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );

cswap( 2, x, -2, y, 1 );

var z = y.get( 0 );
// returns <Complex64>

var re = realf( z );
// returns 5.0

var im = imagf( z );
// returns 6.0

z = x.get( 0 );
// returns <Complex64>

re = realf( z );
// returns 0.0

im = imagf( z );
// returns 0.0
// x => <Complex64Array>[ 0.0, 0.0, 3.0, 4.0, 0.0, 0.0, 7.0, 8.0 ]
// y => <Complex64Array>[ 5.0, 6.0, 1.0, 2.0, 0.0, 0.0, 0.0, 0.0 ]
```

Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
Expand All @@ -108,8 +72,6 @@ Note that indexing is relative to the first index. To introduce an offset, use [

```javascript
var Complex64Array = require( '@stdlib/array/complex64' );
var realf = require( '@stdlib/complex/float32/real' );
var imagf = require( '@stdlib/complex/float32/imag' );

// Initial arrays...
var x0 = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
Expand All @@ -121,24 +83,8 @@ var y1 = new Complex64Array( y0.buffer, y0.BYTES_PER_ELEMENT*2 ); // start at 3r

// Interchange in reverse order every other value from `x1` into `y1`...
cswap( 2, x1, -2, y1, 1 );

var z = y0.get( 2 );
// returns <Complex64>

var re = realf( z );
// returns 7.0

var im = imagf( z );
// returns 8.0

z = x0.get( 1 );
// returns <Complex64>

re = realf( z );
// returns 0.0

im = imagf( z );
// returns 0.0
// x0 => <Complex64Array>[ 1.0, 2.0, 0.0, 0.0, 5.0, 6.0, 0.0, 0.0 ]
// y0 => <Complex64Array>[ 0.0, 0.0, 0.0, 0.0, 7.0, 8.0, 3.0, 4.0 ]
```

#### cswap.ndarray( N, x, strideX, offsetX, y, strideY, offsetY )
Expand All @@ -147,31 +93,13 @@ Interchanges two complex single-precision floating-point vectors using alternati

```javascript
var Complex64Array = require( '@stdlib/array/complex64' );
var realf = require( '@stdlib/complex/float32/real' );
var imagf = require( '@stdlib/complex/float32/imag' );

var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );

cswap.ndarray( x.length, x, 1, 0, y, 1, 0 );

var z = y.get( 0 );
// returns <Complex64>

var re = realf( z );
// returns 1.0

var im = imagf( z );
// returns 2.0

z = x.get( 0 );
// returns <Complex64>

re = realf( z );
// returns 0.0

im = imagf( z );
// returns 0.0
// x => <Complex64Array>[ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]
// y => <Complex64Array>[ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ]
```

The function has the following additional parameters:
Expand All @@ -183,31 +111,13 @@ While [`typed array`][mdn-typed-array] views mandate a view offset based on the

```javascript
var Complex64Array = require( '@stdlib/array/complex64' );
var realf = require( '@stdlib/complex/float32/real' );
var imagf = require( '@stdlib/complex/float32/imag' );

var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );

cswap.ndarray( 2, x, 2, 1, y, -1, y.length-1 );

var z = y.get( y.length-1 );
// returns <Complex64>

var re = realf( z );
// returns 3.0

var im = imagf( z );
// returns 4.0

z = x.get( x.length-1 );
// returns <Complex64>

re = realf( z );
// returns 0.0

im = imagf( z );
// returns 0.0
// x => <Complex64Array>[ 1.0, 2.0, 0.0, 0.0, 5.0, 6.0, 0.0, 0.0 ]
// y => <Complex64Array>[ 0.0, 0.0, 0.0, 0.0, 7.0, 8.0, 3.0, 4.0 ]
```

</section>
Expand Down
70 changes: 20 additions & 50 deletions lib/node_modules/@stdlib/blas/base/cswap/docs/repl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,48 +38,30 @@
> var x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
> var y = new {{alias:@stdlib/array/complex64}}( [ 6.0, 7.0, 8.0, 9.0 ] );
> {{alias}}( x.length, x, 1, y, 1 );
> var z = y.get( 0 );
> var re = {{alias:@stdlib/complex/float32/real}}( z )
1.0
> var im = {{alias:@stdlib/complex/float32/imag}}( z )
2.0
> z = x.get( 0 );
> re = {{alias:@stdlib/complex/float32/real}}( z )
6.0
> im = {{alias:@stdlib/complex/float32/imag}}( z )
7.0
> x
<Complex64Array>[ 6.0, 7.0, 8.0, 9.0 ]
> y
<Complex64Array>[ 1.0, 2.0, 3.0, 4.0 ]

// Advanced indexing:
> x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
> y = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
> {{alias}}( 2, x, -2, y, 1 );
> z = y.get( 0 );
> re = {{alias:@stdlib/complex/float32/real}}( z )
5.0
> im = {{alias:@stdlib/complex/float32/imag}}( z )
6.0
> z = x.get( 0 );
> re = {{alias:@stdlib/complex/float32/real}}( z )
0.0
> im = {{alias:@stdlib/complex/float32/imag}}( z )
0.0
> x
<Complex64Array>[ 0.0, 0.0, 3.0, 4.0, 0.0, 0.0, 7.0, 8.0 ]
> y
<Complex64Array>[ 5.0, 6.0, 1.0, 2.0, 0.0, 0.0, 0.0, 0.0 ]

// Using typed array views:
> var x0 = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
> var y0 = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
> var x1 = new {{alias:@stdlib/array/complex64}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
> var y1 = new {{alias:@stdlib/array/complex64}}( y0.buffer, y0.BYTES_PER_ELEMENT*2 );
> {{alias}}( 2, x1, -2, y1, 1 );
> z = y0.get( 2 );
> re = {{alias:@stdlib/complex/float32/real}}( z )
7.0
> im = {{alias:@stdlib/complex/float32/imag}}( z )
8.0
> z = x0.get( 1 );
> re = {{alias:@stdlib/complex/float32/real}}( z )
0.0
> im = {{alias:@stdlib/complex/float32/imag}}( z )
0.0
> x0
<Complex64Array>[ 1.0, 2.0, 0.0, 0.0, 5.0, 6.0, 0.0, 0.0 ]
> y0
<Complex64Array>[ 0.0, 0.0, 0.0, 0.0, 7.0, 8.0, 3.0, 4.0 ]


{{alias}}.ndarray( N, x, strideX, offsetX, y, strideY, offsetY )
Expand Down Expand Up @@ -124,31 +106,19 @@
> var x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
> var y = new {{alias:@stdlib/array/complex64}}( [ 6.0, 7.0, 8.0, 9.0 ] );
> {{alias}}.ndarray( x.length, x, 1, 0, y, 1, 0 );
> var z = y.get( 0 );
> var re = {{alias:@stdlib/complex/float32/real}}( z )
1.0
> var im = {{alias:@stdlib/complex/float32/imag}}( z )
2.0
> z = x.get( 0 );
> re = {{alias:@stdlib/complex/float32/real}}( z )
6.0
> im = {{alias:@stdlib/complex/float32/imag}}( z )
7.0
> x
<Complex64Array>[ 6.0, 7.0, 8.0, 9.0 ]
> y
<Complex64Array>[ 1.0, 2.0, 3.0, 4.0 ]

// Advanced indexing:
> x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
> y = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
> {{alias}}.ndarray( 2, x, 2, 1, y, -1, y.length-1 );
> z = y.get( y.length-1 );
> re = {{alias:@stdlib/complex/float32/real}}( z )
3.0
> im = {{alias:@stdlib/complex/float32/imag}}( z )
4.0
> z = x.get( 1 );
> re = {{alias:@stdlib/complex/float32/real}}( z )
0.0
> im = {{alias:@stdlib/complex/float32/imag}}( z )
0.0
> x
<Complex64Array>[ 1.0, 2.0, 0.0, 0.0, 5.0, 6.0, 0.0, 0.0 ]
> y
<Complex64Array>[ 0.0, 0.0, 0.0, 0.0, 7.0, 8.0, 3.0, 4.0 ]

See Also
--------
Expand Down
Loading

0 comments on commit f150775

Please sign in to comment.