Skip to content

Commit 1f68a0b

Browse files
authored
Merge branch 'develop' into migrate-math-base-ops-mul
Signed-off-by: Athan <[email protected]>
2 parents e7ab8a5 + c813d0a commit 1f68a0b

File tree

21 files changed

+230
-245
lines changed

21 files changed

+230
-245
lines changed

.github/workflows/scripts/create_address_commit_comments_issues

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -233,19 +233,25 @@ is_core_contributor() {
233233

234234
# Updates two indexed arrays (commit_keys and commit_counts) to simulate a map.
235235
#
236-
# $1 - Commit SHA (the key)
237-
# $2 - Comment URL (the link)
236+
# $1 - Full comment object (JSON)
238237
update_commit_map() {
239-
local key="$1"
240-
local link="$2"
238+
local comment="$1"
239+
local key=$(echo "$comment" | jq -r '.commit_id')
240+
local link=$(echo "$comment" | jq -r '.html_url')
241+
local body=$(echo "$comment" | jq -r '.body')
242+
local line=$(echo "$comment" | jq -r '.line')
243+
local path=$(echo "$comment" | jq -r '.path')
241244
local found=0
242245
local i=0
243246

247+
local startLine=$(( line - 3 ))
248+
local endLine=$(( line + 3 ))
249+
local code_snippet="https://github.com/stdlib-js/stdlib/blob/${key}/${path}#L${startLine}-L${endLine}"
250+
244251
for existing in "${commit_keys[@]}"; do
245252
if [ "$existing" = "$key" ]; then
246253
commit_counts[i]=$(( commit_counts[i] + 1 ))
247-
# Append the comment URL (on a new bullet) to the existing list:
248-
commit_links[i]="${commit_links[i]}"$'\n'"- ${link}"
254+
commit_comments[i]="${commit_comments[i]}"$'\n\n'"- ${link}"$'\n\n'" > **Line ${line}**: ${body}"$'\n\n'" ${code_snippet}"
249255
found=1
250256
break
251257
fi
@@ -255,7 +261,7 @@ update_commit_map() {
255261
if [ "$found" -eq 0 ]; then
256262
commit_keys+=("$key")
257263
commit_counts+=("1")
258-
commit_links+=("- ${link}")
264+
commit_comments+=("- ${link}"$'\n\n'" > **Line ${line}**: ${body}"$'\n\n'" ${code_snippet}")
259265
fi
260266
}
261267

@@ -339,12 +345,12 @@ main() {
339345

340346
commit_keys=()
341347
commit_counts=()
342-
commit_links=()
348+
commit_comments=()
343349

344350
for comment in "${all_comments[@]}"; do
345351
# Extract the comment body:
346-
local comment_body
347-
comment_body=$(echo "$comment" | jq -r '.body')
352+
local comment_body=$(echo "$comment" | jq -r '.body')
353+
local comment_line=$(echo "$comment" | jq -r '.line')
348354

349355
# Check if the comment body contains '@stdlib-bot':
350356
if [[ "$comment_body" == *"@stdlib-bot"* ]]; then
@@ -357,10 +363,7 @@ main() {
357363
local commit_sha
358364
commit_sha=$(echo "$comment" | jq -r '.commit_id')
359365
if [ -n "$commit_sha" ]; then
360-
# Extract the comment URL:
361-
local comment_url
362-
comment_url=$(echo "$comment" | jq -r '.html_url')
363-
update_commit_map "$commit_sha" "$comment_url"
366+
update_commit_map "$comment"
364367
fi
365368
else
366369
echo "Skipping comment by non-core contributor: ${comment_author}" >&2
@@ -373,7 +376,7 @@ main() {
373376
for idx in $(seq 0 $(( ${#commit_keys[@]} - 1 ))); do
374377
local commit_sha="${commit_keys[$idx]}"
375378
local count="${commit_counts[$idx]}"
376-
local links="${commit_links[$idx]}"
379+
local comments="${commit_comments[$idx]}"
377380

378381
# Generate a short SHA (first 7 characters):
379382
local short_sha=${commit_sha:0:7}
@@ -385,7 +388,7 @@ main() {
385388
386389
**Comments:**
387390
388-
${links}
391+
${comments}
389392
390393
Interested in helping improve the project? If you are, the comment linked to above has **${count}** comment(s) from core contributors that could use your attention.
391394

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ int main( void ) {
285285
286286
- <span class="package-name">[`@stdlib/blas/ext/base/dapxsum`][@stdlib/blas/ext/base/dapxsum]</span><span class="delimiter">: </span><span class="description">add a scalar constant to each double-precision floating-point strided array element and compute the sum.</span>
287287
- <span class="package-name">[`@stdlib/blas/ext/base/dsumkbn2`][@stdlib/blas/ext/base/dsumkbn2]</span><span class="delimiter">: </span><span class="description">calculate the sum of double-precision floating-point strided array elements using a second-order iterative Kahan–Babuška algorithm.</span>
288-
- <span class="package-name">[`@stdlib/blas/ext/base/gapxsumkbn2`][@stdlib/blas/ext/base/gapxsumkbn2]</span><span class="delimiter">: </span><span class="description">add a constant to each strided array element and compute the sum using a second-order iterative Kahan–Babuška algorithm.</span>
289-
- <span class="package-name">[`@stdlib/blas/ext/base/sapxsumkbn2`][@stdlib/blas/ext/base/sapxsumkbn2]</span><span class="delimiter">: </span><span class="description">add a constant to each single-precision floating-point strided array element and compute the sum using a second-order iterative Kahan–Babuška algorithm.</span>
288+
- <span class="package-name">[`@stdlib/blas/ext/base/gapxsumkbn2`][@stdlib/blas/ext/base/gapxsumkbn2]</span><span class="delimiter">: </span><span class="description">add a scalar constant to each strided array element and compute the sum using a second-order iterative Kahan–Babuška algorithm.</span>
289+
- <span class="package-name">[`@stdlib/blas/ext/base/sapxsumkbn2`][@stdlib/blas/ext/base/sapxsumkbn2]</span><span class="delimiter">: </span><span class="description">add a scalar constant to each single-precision floating-point strided array element and compute the sum using a second-order iterative Kahan–Babuška algorithm.</span>
290290
291291
</section>
292292

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ int main( void ) {
282282
283283
- <span class="package-name">[`@stdlib/blas/ext/base/dapxsum`][@stdlib/blas/ext/base/dapxsum]</span><span class="delimiter">: </span><span class="description">add a scalar constant to each double-precision floating-point strided array element and compute the sum.</span>
284284
- <span class="package-name">[`@stdlib/blas/ext/base/dsumors`][@stdlib/blas/ext/base/dsumors]</span><span class="delimiter">: </span><span class="description">calculate the sum of double-precision floating-point strided array elements using ordinary recursive summation.</span>
285-
- <span class="package-name">[`@stdlib/blas/ext/base/gapxsumors`][@stdlib/blas/ext/base/gapxsumors]</span><span class="delimiter">: </span><span class="description">add a constant to each strided array element and compute the sum using ordinary recursive summation.</span>
285+
- <span class="package-name">[`@stdlib/blas/ext/base/gapxsumors`][@stdlib/blas/ext/base/gapxsumors]</span><span class="delimiter">: </span><span class="description">add a scalar constant to each strided array element and compute the sum using ordinary recursive summation.</span>
286286
- <span class="package-name">[`@stdlib/blas/ext/base/sapxsumors`][@stdlib/blas/ext/base/sapxsumors]</span><span class="delimiter">: </span><span class="description">add a scalar constant to each single-precision floating-point strided array element and compute the sum using ordinary recursive summation.</span>
287287
288288
</section>

lib/node_modules/@stdlib/math/base/ops/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ The namespace contains the following functions:
4545

4646
<div class="namespace-toc">
4747

48-
- <span class="signature">[`addf( x, y )`][@stdlib/number/float32/base/add]</span><span class="delimiter">: </span><span class="description">compute the sum of two single-precision floating-point numbers.</span>
4948
- <span class="signature">[`cdiv( z1, z2 )`][@stdlib/math/base/ops/cdiv]</span><span class="delimiter">: </span><span class="description">divide two double-precision complex floating-point numbers.</span>
5049
- <span class="signature">[`cneg( z )`][@stdlib/math/base/ops/cneg]</span><span class="delimiter">: </span><span class="description">negate a double-precision complex floating-point number.</span>
5150
- <span class="signature">[`cnegf( z )`][@stdlib/math/base/ops/cnegf]</span><span class="delimiter">: </span><span class="description">negate a single-precision complex floating-point number.</span>
@@ -132,8 +131,6 @@ console.log( ns.imuldw( 0x80000000|0, 0x40000000|0 ) );
132131

133132
<!-- <toc-links> -->
134133

135-
[@stdlib/number/float32/base/add]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/number/float32/base/add
136-
137134
[@stdlib/math/base/ops/cdiv]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/ops/cdiv
138135

139136
[@stdlib/math/base/ops/cneg]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/ops/cneg

lib/node_modules/@stdlib/math/base/ops/docs/types/index.d.ts

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import caddf = require( '@stdlib/complex/float32/base/add' );
2424
import cmulf = require( '@stdlib/complex/float32/base/mul' );
2525
import cadd = require( '@stdlib/complex/float64/base/add' );
2626
import cmul = require( '@stdlib/complex/float64/base/mul' );
27-
import addf = require( '@stdlib/number/float32/base/add' );
2827
import cdiv = require( '@stdlib/math/base/ops/cdiv' );
2928
import cneg = require( '@stdlib/math/base/ops/cneg' );
3029
import cnegf = require( '@stdlib/math/base/ops/cnegf' );
@@ -40,6 +39,7 @@ import sub = require( '@stdlib/math/base/ops/sub' );
4039
import subf = require( '@stdlib/math/base/ops/subf' );
4140
import umul = require( '@stdlib/math/base/ops/umul' );
4241
import umuldw = require( '@stdlib/math/base/ops/umuldw' );
42+
import addf = require( '@stdlib/number/float32/base/add' );
4343

4444
/**
4545
* Interface describing the `ops` namespace.
@@ -212,35 +212,6 @@ interface Namespace {
212212
*/
213213
cmul: typeof cmul;
214214

215-
/**
216-
* Computes the sum of two single-precision floating-point numbers `x` and `y`.
217-
*
218-
* @param x - first input value
219-
* @param y - second input value
220-
* @returns sum
221-
*
222-
* @example
223-
* var v = ns.addf( -1.0, 5.0 );
224-
* // returns 4.0
225-
*
226-
* @example
227-
* var v = ns.addf( 2.0, 5.0 );
228-
* // returns 7.0
229-
*
230-
* @example
231-
* var v = ns.addf( 0.0, 5.0 );
232-
* // returns 5.0
233-
*
234-
* @example
235-
* var v = ns.addf( -0.0, 0.0 );
236-
* // returns 0.0
237-
*
238-
* @example
239-
* var v = ns.addf( NaN, NaN );
240-
* // returns NaN
241-
*/
242-
addf: typeof addf;
243-
244215
/**
245216
* Divides two double-precision complex floating-point numbers.
246217
*
@@ -679,6 +650,35 @@ interface Namespace {
679650
* // returns [ 954437176, 1908874354 ]
680651
*/
681652
umuldw: typeof umuldw;
653+
654+
/**
655+
* Computes the sum of two single-precision floating-point numbers `x` and `y`.
656+
*
657+
* @param x - first input value
658+
* @param y - second input value
659+
* @returns sum
660+
*
661+
* @example
662+
* var v = ns.addf( -1.0, 5.0 );
663+
* // returns 4.0
664+
*
665+
* @example
666+
* var v = ns.addf( 2.0, 5.0 );
667+
* // returns 7.0
668+
*
669+
* @example
670+
* var v = ns.addf( 0.0, 5.0 );
671+
* // returns 5.0
672+
*
673+
* @example
674+
* var v = ns.addf( -0.0, 0.0 );
675+
* // returns 0.0
676+
*
677+
* @example
678+
* var v = ns.addf( NaN, NaN );
679+
* // returns NaN
680+
*/
681+
addf: typeof addf;
682682
}
683683

684684
/**

lib/node_modules/@stdlib/namespace/alias2pkg/data/data.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/node_modules/@stdlib/namespace/alias2standalone/data/data.csv

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ base.add,"@stdlib/number-float64-base-add"
9595
base.add3,"@stdlib/number-float64-base-add3"
9696
base.add4,"@stdlib/number-float64-base-add4"
9797
base.add5,"@stdlib/number-float64-base-add5"
98-
base.addf,"@stdlib/math-base-ops-addf"
98+
base.addf,"@stdlib/number-float32-base-add"
9999
base.afilled,"@stdlib/array-base-filled"
100100
base.afilled2d,"@stdlib/array-base-filled2d"
101101
base.afilled2dBy,"@stdlib/array-base-filled2d-by"
@@ -1060,12 +1060,12 @@ base.strided.dmaxabssorted,"@stdlib/stats-strided-dmaxabssorted"
10601060
base.strided.dmaxsorted,"@stdlib/stats-strided-dmaxsorted"
10611061
base.strided.dmean,"@stdlib/stats-base-dmean"
10621062
base.strided.dmeankbn,"@stdlib/stats-strided-dmeankbn"
1063-
base.strided.dmeankbn2,"@stdlib/stats-base-dmeankbn2"
1064-
base.strided.dmeanli,"@stdlib/stats-base-dmeanli"
1065-
base.strided.dmeanlipw,"@stdlib/stats-base-dmeanlipw"
1066-
base.strided.dmeanors,"@stdlib/stats-base-dmeanors"
1063+
base.strided.dmeankbn2,"@stdlib/stats-strided-dmeankbn2"
1064+
base.strided.dmeanli,"@stdlib/stats-strided-dmeanli"
1065+
base.strided.dmeanlipw,"@stdlib/stats-strided-dmeanlipw"
1066+
base.strided.dmeanors,"@stdlib/stats-strided-dmeanors"
10671067
base.strided.dmeanpn,"@stdlib/stats-base-dmeanpn"
1068-
base.strided.dmeanpw,"@stdlib/stats-base-dmeanpw"
1068+
base.strided.dmeanpw,"@stdlib/stats-strided-dmeanpw"
10691069
base.strided.dmeanstdev,"@stdlib/stats-base-dmeanstdev"
10701070
base.strided.dmeanstdevpn,"@stdlib/stats-base-dmeanstdevpn"
10711071
base.strided.dmeanvar,"@stdlib/stats-base-dmeanvar"

lib/node_modules/@stdlib/namespace/alias2standalone/data/data.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/node_modules/@stdlib/namespace/pkg2alias/data/data.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/node_modules/@stdlib/namespace/pkg2related/data/data.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)