Skip to content

Commit a020cf6

Browse files
committed
Auto-generated commit
1 parent 225874b commit a020cf6

28 files changed

+268
-360
lines changed

.gitattributes

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,26 @@
4040
*.mov binary
4141

4242
# Override what is considered "vendored" by GitHub's linguist:
43-
/deps/** linguist-vendored=false
44-
/lib/node_modules/** linguist-vendored=false linguist-generated=false
45-
test/fixtures/** linguist-vendored=false
46-
tools/** linguist-vendored=false
43+
/lib/node_modules/** -linguist-vendored -linguist-generated
4744

48-
# Override what is considered "documentation" by GitHub's linguist:
49-
examples/** linguist-documentation=false
45+
# Configure directories which should *not* be included in GitHub language statistics:
46+
/deps/** linguist-vendored
47+
/dist/** linguist-generated
48+
/workshops/** linguist-vendored
49+
50+
benchmark/** linguist-vendored
51+
docs/* linguist-documentation
52+
etc/** linguist-vendored
53+
examples/** linguist-documentation
54+
scripts/** linguist-vendored
55+
test/** linguist-vendored
56+
tools/** linguist-vendored
57+
58+
# Configure files which should *not* be included in GitHub language statistics:
59+
Makefile linguist-vendored
60+
*.mk linguist-vendored
61+
*.jl linguist-vendored
62+
*.py linguist-vendored
63+
64+
# Configure files which should be included in GitHub language statistics:
65+
docs/types/*.d.ts -linguist-documentation

.github/workflows/productionize.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@ jobs:
344344
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
345345
with:
346346
status: ${{ job.status }}
347-
steps: ${{ toJson(steps) }}
348347
channel: '#npm-ci'
349348
if: failure()
350349

@@ -518,7 +517,6 @@ jobs:
518517
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
519518
with:
520519
status: ${{ job.status }}
521-
steps: ${{ toJson(steps) }}
522520
channel: '#npm-ci'
523521
if: failure()
524522

@@ -698,7 +696,6 @@ jobs:
698696
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
699697
with:
700698
status: ${{ job.status }}
701-
steps: ${{ toJson(steps) }}
702699
channel: '#npm-ci'
703700
if: failure()
704701

.github/workflows/publish.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ jobs:
218218
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
219219
with:
220220
status: ${{ job.status }}
221-
steps: ${{ toJson(steps) }}
222221
channel: '#npm-ci'
223222
if: failure()
224223

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,5 @@ jobs:
9595
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
9696
with:
9797
status: ${{ job.status }}
98-
steps: ${{ toJson(steps) }}
9998
channel: '#npm-ci'
10099
if: failure()

.github/workflows/test_bundles.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ jobs:
9494
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
9595
with:
9696
status: ${{ job.status }}
97-
steps: ${{ toJson(steps) }}
9897
channel: '#npm-ci'
9998
if: failure()
10099

@@ -139,7 +138,6 @@ jobs:
139138
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
140139
with:
141140
status: ${{ job.status }}
142-
steps: ${{ toJson(steps) }}
143141
channel: '#npm-ci'
144142
if: failure()
145143

@@ -184,6 +182,5 @@ jobs:
184182
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
185183
with:
186184
status: ${{ job.status }}
187-
steps: ${{ toJson(steps) }}
188185
channel: '#npm-ci'
189186
if: failure()

.github/workflows/test_coverage.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ jobs:
119119
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
120120
with:
121121
status: ${{ job.status }}
122-
steps: ${{ toJson(steps) }}
123122
channel: '#npm-ci'
124123
if: failure()
125124

.github/workflows/test_install.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,5 @@ jobs:
8181
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
8282
with:
8383
status: ${{ job.status }}
84-
steps: ${{ toJson(steps) }}
8584
channel: '#npm-ci'
8685
if: failure()

CONTRIBUTORS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Adarsh Palaskar <adarshpalaskar99@gmail.com>
66
Aditya Sapra <adityaework@gmail.com>
77
AgPriyanshu18 <113460573+AgPriyanshu18@users.noreply.github.com>
8+
Aleksandr <112382387+alextes90@users.noreply.github.com>
89
Ali Salesi <ali_sal1381@yahoo.com>
910
Aman Bhansali <bhansali.1@iitj.ac.in>
1011
Amit Jimiwal <amitjimiwal45@gmail.com>
@@ -18,6 +19,7 @@ Chinmay Joshi <86140365+JawHawk@users.noreply.github.com>
1819
Christopher Dambamuromo <chridam@gmail.com>
1920
Dan Rose <danoftheroses@gmail.com>
2021
Daniel Killenberger <daniel.killenberger@gmail.com>
22+
Daniel Yu <40680511+Daniel777y@users.noreply.github.com>
2123
Dominik Moritz <domoritz@gmail.com>
2224
Dorrin Sotoudeh <dorrinsotoudeh123@gmail.com>
2325
EuniceSim142 <77243938+EuniceSim142@users.noreply.github.com>
@@ -69,8 +71,10 @@ Seyyed Parsa Neshaei <spneshaei@users.noreply.github.com>
6971
Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
7072
Shivam <11shivam00@gmail.com>
7173
Shraddheya Shendre <shendreshraddheya@gmail.com>
74+
Shubh Mehta <93862397+Shubh942@users.noreply.github.com>
7275
Shubham Mishra <shubh622005@gmail.com>
7376
Snehil Shah <130062020+Snehil-Shah@users.noreply.github.com>
77+
Soumajit Chatterjee <121816890+soumajit23@users.noreply.github.com>
7478
Spandan Barve <contact@marsian.dev>
7579
Stephannie Jiménez Gacha <steff456@hotmail.com>
7680
Suraj kumar <125961509+kumarsuraj212003@users.noreply.github.com>
@@ -83,4 +87,5 @@ Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
8387
naveen <stupiddint@gmail.com>
8488
nishant-s7 <97207366+nishant-s7@users.noreply.github.com>
8589
orimiles5 <97595296+orimiles5@users.noreply.github.com>
90+
rainn <88160429+AmCodesLame@users.noreply.github.com>
8691
rei2hu <reimu@reimu.ws>

README.md

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,15 @@ The function has the following parameters:
9191
- **out**: output [`Float64Array`][@stdlib/array/float64] whose first element is the sum and whose second element is the number of non-NaN elements.
9292
- **strideOut**: index increment for `out`.
9393

94-
The `N` and `stride` parameters determine which elements are accessed at runtime. For example, to compute the sum of every other element in `x`,
94+
The `N` and stride parameters determine which elements are accessed at runtime. For example, to compute the sum of every other element in `x`,
9595

9696
```javascript
9797
var Float64Array = require( '@stdlib/array-float64' );
98-
var floor = require( '@stdlib/math-base-special-floor' );
9998

10099
var x = new Float64Array( [ 1.0, 2.0, NaN, -7.0, NaN, 3.0, 4.0, 2.0 ] );
101100
var out = new Float64Array( 2 );
102-
var N = floor( x.length / 2 );
103101

104-
var v = dnannsumkbn2( N, x, 2, out, 1 );
102+
var v = dnannsumkbn2( 4, x, 2, out, 1 );
105103
// returns <Float64Array>[ 5.0, 2 ]
106104
```
107105

@@ -111,17 +109,14 @@ Note that indexing is relative to the first index. To introduce an offset, use [
111109

112110
```javascript
113111
var Float64Array = require( '@stdlib/array-float64' );
114-
var floor = require( '@stdlib/math-base-special-floor' );
115112

116113
var x0 = new Float64Array( [ 2.0, 1.0, NaN, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
117114
var x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
118115

119116
var out0 = new Float64Array( 4 );
120117
var out1 = new Float64Array( out0.buffer, out0.BYTES_PER_ELEMENT*2 ); // start at 3rd element
121118

122-
var N = floor( x0.length / 2 );
123-
124-
var v = dnannsumkbn2( N, x1, 2, out1, 1 );
119+
var v = dnannsumkbn2( 4, x1, 2, out1, 1 );
125120
// returns <Float64Array>[ 5.0, 4 ]
126121
```
127122

@@ -148,13 +143,11 @@ While [`typed array`][mdn-typed-array] views mandate a view offset based on the
148143

149144
```javascript
150145
var Float64Array = require( '@stdlib/array-float64' );
151-
var floor = require( '@stdlib/math-base-special-floor' );
152146

153147
var x = new Float64Array( [ 2.0, 1.0, NaN, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
154148
var out = new Float64Array( 4 );
155-
var N = floor( x.length / 2 );
156149

157-
var v = dnannsumkbn2.ndarray( N, x, 2, 1, out, 2, 1 );
150+
var v = dnannsumkbn2.ndarray( 4, x, 2, 1, out, 2, 1 );
158151
// returns <Float64Array>[ 0.0, 5.0, 0.0, 4 ]
159152
```
160153

@@ -179,22 +172,20 @@ var v = dnannsumkbn2.ndarray( N, x, 2, 1, out, 2, 1 );
179172
<!-- eslint no-undef: "error" -->
180173

181174
```javascript
182-
var randu = require( '@stdlib/random-base-randu' );
183-
var round = require( '@stdlib/math-base-special-round' );
175+
var bernoulli = require( '@stdlib/random-base-bernoulli' );
176+
var discreteUniform = require( '@stdlib/random-base-discrete-uniform' );
177+
var filledarrayBy = require( '@stdlib/array-filled-by' );
184178
var Float64Array = require( '@stdlib/array-float64' );
185179
var dnannsumkbn2 = require( '@stdlib/blas-ext-base-dnannsumkbn2' );
186180

187-
var x;
188-
var i;
189-
190-
x = new Float64Array( 10 );
191-
for ( i = 0; i < x.length; i++ ) {
192-
if ( randu() < 0.2 ) {
193-
x[ i ] = NaN;
194-
} else {
195-
x[ i ] = round( randu()*100.0 );
181+
function rand() {
182+
if ( bernoulli( 0.8 ) > 0 ) {
183+
return discreteUniform( 0, 100 );
196184
}
185+
return NaN;
197186
}
187+
188+
var x = filledarrayBy( 10, 'float64', rand );
198189
console.log( x );
199190

200191
var out = new Float64Array( 2 );

benchmark/benchmark.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench-harness' );
24-
var randu = require( '@stdlib/random-base-randu' );
24+
var bernoulli = require( '@stdlib/random-base-bernoulli' );
25+
var discreteUniform = require( '@stdlib/random-base-discrete-uniform' );
26+
var filledarrayBy = require( '@stdlib/array-filled-by' );
2527
var isnan = require( '@stdlib/math-base-assert-is-nan' );
2628
var pow = require( '@stdlib/math-base-special-pow' );
2729
var Float64Array = require( '@stdlib/array-float64' );
@@ -41,16 +43,15 @@ var dnannsumkbn2 = require( './../lib/dnannsumkbn2.js' );
4143
function createBenchmark( len ) {
4244
var out;
4345
var x;
44-
var i;
4546

46-
x = new Float64Array( len );
47-
for ( i = 0; i < len; i++ ) {
48-
if ( randu() < 0.2 ) {
49-
x[ i ] = NaN;
50-
} else {
51-
x[ i ] = ( randu()*10.0 ) - 20.0;
47+
function clbk() {
48+
if ( bernoulli( 0.7 ) > 0 ) {
49+
return discreteUniform( -10, 10 );
5250
}
51+
return NaN;
5352
}
53+
54+
x = filledarrayBy( len, 'float64', clbk );
5455
out = new Float64Array( 2 );
5556
return benchmark;
5657

0 commit comments

Comments
 (0)