Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 151d830

Browse files
Merge branch 'stdlib-js:develop' into develop
2 parents 56a3189 + 91b52d8 commit 151d830

File tree

8 files changed

+66
-55
lines changed

8 files changed

+66
-55
lines changed

‎lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-leading-description-sentence/test/fixtures/invalid.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ test = {
212212
'',
213213
'var ctors = require( "./main.js" );'
214214
].join( '\n' ),
215-
'options': [{
215+
'options': [{
216216
'whitelist': [ 'ndarray' ]
217-
}],
217+
}],
218218
'errors': [
219219
{
220220
'message': 'Description must start with an uppercase letter or number and end with a period',

‎lib/node_modules/@stdlib/_tools/github/create-repo/lib/factory.js‎

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -95,21 +95,22 @@ function factory( options, clbk ) {
9595
throw new TypeError( format( 'invalid argument. Repository name must be a string. Value: `%s`.', name ) );
9696
}
9797
query( name, opts, done );
98-
/**
99-
* Callback invoked after receiving an API response.
100-
*
101-
* @private
102-
* @param {(Error|null)} error - error object
103-
* @param {ObjectArray} data - query data
104-
* @param {Object} info - response info
105-
* @returns {void}
106-
*/
107-
function done( error, data, info ) {
108-
error = error || null;
109-
data = data || null;
110-
info = info || null;
111-
clbk( error, data, info );
112-
}
98+
}
99+
100+
/**
101+
* Callback invoked after receiving an API response.
102+
*
103+
* @private
104+
* @param {(Error|null)} error - error object
105+
* @param {ObjectArray} data - query data
106+
* @param {Object} info - response info
107+
* @returns {void}
108+
*/
109+
function done( error, data, info ) {
110+
error = error || null;
111+
data = data || null;
112+
info = info || null;
113+
clbk( error, data, info );
113114
}
114115
}
115116

‎lib/node_modules/@stdlib/_tools/remark/plugins/remark-run-javascript-examples/lib/main.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
* limitations under the License.
1717
*/
1818

19+
/* eslint-disable stdlib/jsdoc-example-require-spacing */
20+
1921
'use strict';
2022

2123
// MODULES //
@@ -77,8 +79,8 @@ var runner = require( './runner.js' );
7779
* ''
7880
* ];
7981
*
80-
* remark().use( run ).process( str.join( '\n' ), done );
81-
* // => 'HELLO WORLD'
82+
* remark().use( attacher ).process( str.join( '\n' ), done );
83+
* // e.g., => 'HELLO WORLD!'
8284
*
8385
* function done( error ) {
8486
* if ( error ) {

‎lib/node_modules/@stdlib/assert/is-complex-like/examples/index.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
* limitations under the License.
1717
*/
1818

19-
/* eslint-disable object-curly-newline, object-property-newline */
20-
2119
'use strict';
2220

2321
var Complex64 = require( '@stdlib/complex/float32/ctor' );
@@ -30,7 +28,11 @@ console.log( isComplexLike( new Complex64( 2.0, 2.0 ) ) );
3028
console.log( isComplexLike( new Complex128( 3.0, 1.0 ) ) );
3129
// => true
3230

33-
console.log( isComplexLike( { 're': 1.0, 'im': -1.0 } ) );
31+
var obj = {
32+
're': 1.0,
33+
'im': -1.0
34+
};
35+
console.log( isComplexLike( obj ) );
3436
// => true
3537

3638
console.log( isComplexLike( {} ) );

‎lib/node_modules/@stdlib/assert/is-method/examples/index.js‎

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,25 @@
1616
* limitations under the License.
1717
*/
1818

19-
/* eslint-disable object-curly-newline */
20-
2119
'use strict';
2220

2321
var isMethod = require( './../lib' );
2422

25-
var bool = isMethod( { 'a': isMethod }, 'a' );
23+
var obj = {
24+
'a': isMethod
25+
};
26+
var bool = isMethod( obj, 'a' );
2627
console.log( bool );
2728
// => true
2829

29-
bool = isMethod( { 'a': 'b' }, 'a' );
30+
obj = {
31+
'a': 'b'
32+
};
33+
bool = isMethod( obj, 'a' );
3034
console.log( bool );
3135
// => false
3236

33-
bool = isMethod( {'a': 'b'}, null );
37+
bool = isMethod( obj, null );
3438
console.log( bool );
3539
// => false
3640

@@ -46,10 +50,16 @@ bool = isMethod( void 0, 'a' );
4650
console.log( bool );
4751
// => false
4852

49-
bool = isMethod( { 'null': isMethod }, null );
53+
obj = {
54+
'null': isMethod
55+
};
56+
bool = isMethod( obj, null );
5057
console.log( bool );
5158
// => true
5259

53-
bool = isMethod( { '[object Object]': isMethod }, {} );
60+
obj = {
61+
'[object Object]': isMethod
62+
};
63+
bool = isMethod( obj, {} );
5464
console.log( bool );
5565
// => true

‎lib/node_modules/@stdlib/ndarray/base/shape2strides/benchmark/benchmark.js‎

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

2323
var bench = require( '@stdlib/bench' );
24-
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
25-
var randu = require( '@stdlib/random/base/randu' );
26-
var floor = require( '@stdlib/math/base/special/floor' );
24+
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
25+
var zeros = require( '@stdlib/array/base/zeros' );
2726
var isArray = require( '@stdlib/assert/is-array' );
2827
var pkg = require( './../package.json' ).name;
2928
var shape2strides = require( './../lib' );
@@ -36,14 +35,13 @@ bench( pkg+':order=row-major', function benchmark( b ) {
3635
var out;
3736
var i;
3837

39-
shape = [ 0, 0, 0 ];
40-
shape[ 0 ] = discreteUniform( 0, 10 );
41-
shape[ 1 ] = discreteUniform( 0, 10 );
42-
shape[ 2 ] = discreteUniform( 0, 10 );
38+
shape = discreteUniform( 3, 0, 10, {
39+
'dtype': 'generic'
40+
});
4341

4442
b.tic();
4543
for ( i = 0; i < b.iterations; i++ ) {
46-
shape[ 0 ] =floor(randu()*10);
44+
shape[ 0 ] +=1;
4745
out = shape2strides( shape, 'row-major' );
4846
if ( out.length !== shape.length ) {
4947
b.fail( 'should have expected length' );
@@ -62,14 +60,13 @@ bench( pkg+':order=column-major', function benchmark( b ) {
6260
var out;
6361
var i;
6462

65-
shape = [ 0, 0, 0 ];
66-
shape[ 0 ] = floor( randu()*10 );
67-
shape[ 1 ] = floor( randu()*10 );
68-
shape[ 2 ] = floor( randu()*10 );
63+
shape = discreteUniform( 3, 0, 10, {
64+
'dtype': 'generic'
65+
});
6966

7067
b.tic();
7168
for ( i = 0; i < b.iterations; i++ ) {
72-
shape[ 0 ] =floor(randu()*10);
69+
shape[ 0 ] +=1;
7370
out = shape2strides( shape, 'column-major' );
7471
if ( out.length !== shape.length ) {
7572
b.fail( 'should have expected length' );
@@ -88,16 +85,15 @@ bench( pkg+':assign:order=row-major', function benchmark( b ) {
8885
var out;
8986
var i;
9087

91-
shape = [ 0, 0, 0 ];
92-
shape[ 0 ] = floor( randu()*10 );
93-
shape[ 1 ] = floor( randu()*10 );
94-
shape[ 2 ] = floor( randu()*10 );
88+
shape = discreteUniform( 3, 0, 10, {
89+
'dtype': 'generic'
90+
});
9591

96-
out = newArray( shape.length );
92+
out = zeros( shape.length );
9793

9894
b.tic();
9995
for ( i = 0; i < b.iterations; i++ ) {
100-
shape[ 0 ] =floor(randu()*10);
96+
shape[ 0 ] +=1;
10197
out = shape2strides.assign( shape, 'row-major', out );
10298
if ( out.length !== shape.length ) {
10399
b.fail( 'should have expected length' );
@@ -116,16 +112,15 @@ bench( pkg+':assign:order=column-major', function benchmark( b ) {
116112
var out;
117113
var i;
118114

119-
shape = [ 0, 0, 0 ];
120-
shape[ 0 ] = floor( randu()*10 );
121-
shape[ 1 ] = floor( randu()*10 );
122-
shape[ 2 ] = floor( randu()*10 );
115+
shape = discreteUniform( 3, 0, 10, {
116+
'dtype': 'generic'
117+
});
123118

124-
out = newArray( shape.length );
119+
out = zeros( shape.length );
125120

126121
b.tic();
127122
for ( i = 0; i < b.iterations; i++ ) {
128-
shape[ 0 ] =floor(randu()*10);
123+
shape[ 0 ] +=1;
129124
out = shape2strides.assign( shape, 'column-major', out );
130125
if ( out.length !== shape.length ) {
131126
b.fail( 'should have expected length' );

‎lib/node_modules/@stdlib/plot/ctor/lib/view/electron/js/debug.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var debug;
3131
localStorage.debug = ENV.DEBUG;
3232

3333
// Load `debug`:
34-
debug = require( 'debug/browser' ); // eslint-disable-line stdlib/require-order
34+
debug = require( 'debug/browser' ); // eslint-disable-line stdlib/require-order, stdlib/require-file-extensions
3535

3636

3737
// EXPORTS //

‎lib/node_modules/@stdlib/stats/strided/dmeanstdev/benchmark/c/benchmark.length.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ static double benchmark( int iterations, int len ) {
109109

110110
t = tic();
111111
for ( i = 0; i < iterations; i++ ) {
112+
// cppcheck-suppress uninitvar
112113
stdlib_strided_dmeanstdev( len, 1.0, x, 1, out, 1 );
113114
if ( out[ i%2 ] != out[ i%2 ] ) {
114115
printf( "should not return NaN\n" );

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /