Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ import gfirstIndexEqual = require( './index' );

// The function returns a number...
{
var x = [ 1.0, 2.0, 3.0 ];
var y = [ 1.0, 2.0, 3.0 ];
const x = [ 1.0, 2.0, 3.0 ];
const y = [ 1.0, 2.0, 3.0 ];

gfirstIndexEqual( x.length, x, 1, y, 1 ); // $ExpectType number
gfirstIndexEqual( x.length, new AccessorArray( x ), 1, new AccessorArray( y ), 1 ); // $ExpectType number
}

// The compiler throws an error if the function is provided a first argument which is not a number...
{
var x = [ 1.0, 2.0, 3.0 ];
var y = [ 1.0, 2.0, 3.0 ];
const x = [ 1.0, 2.0, 3.0 ];
const y = [ 1.0, 2.0, 3.0 ];

gfirstIndexEqual( '1', x, 1, y, 1 ); // $ExpectError
gfirstIndexEqual( true, x, 1, y, 1 ); // $ExpectError
Expand All @@ -48,7 +48,7 @@ import gfirstIndexEqual = require( './index' );

// The compiler throws an error if the function is provided a second argument which is not a collection...
{
var y = [ 1.0, 2.0, 3.0 ];
const y = [ 1.0, 2.0, 3.0 ];

gfirstIndexEqual( 3, 10, 1, y, 1 ); // $ExpectError
gfirstIndexEqual( 3, true, 1, y, 1 ); // $ExpectError
Expand All @@ -60,8 +60,8 @@ import gfirstIndexEqual = require( './index' );

// The compiler throws an error if the function is provided a third argument which is not a number...
{
var x = [ 1.0, 2.0, 3.0 ];
var y = [ 1.0, 2.0, 3.0 ];
const x = [ 1.0, 2.0, 3.0 ];
const y = [ 1.0, 2.0, 3.0 ];

gfirstIndexEqual( x.length, x, '1', y, 1 ); // $ExpectError
gfirstIndexEqual( x.length, x, true, y, 1 ); // $ExpectError
Expand All @@ -75,7 +75,7 @@ import gfirstIndexEqual = require( './index' );

// The compiler throws an error if the function is provided a fourth argument which is not a collection...
{
var x = [ 1.0, 2.0, 3.0 ];
const x = [ 1.0, 2.0, 3.0 ];

gfirstIndexEqual( x.length, x, 1, 10, 1 ); // $ExpectError
gfirstIndexEqual( x.length, x, 1, true, 1 ); // $ExpectError
Expand All @@ -87,8 +87,8 @@ import gfirstIndexEqual = require( './index' );

// The compiler throws an error if the function is provided a fifth argument which is not a number...
{
var x = [ 1.0, 2.0, 3.0 ];
var y = [ 1.0, 2.0, 3.0 ];
const x = [ 1.0, 2.0, 3.0 ];
const y = [ 1.0, 2.0, 3.0 ];

gfirstIndexEqual( x.length, x, 1, y, '1' ); // $ExpectError
gfirstIndexEqual( x.length, x, 1, y, true ); // $ExpectError
Expand All @@ -102,8 +102,8 @@ import gfirstIndexEqual = require( './index' );

// The compiler throws an error if the function is provided an unsupported number of arguments...
{
var x = [ 1.0, 2.0, 3.0 ];
var y = [ 1.0, 2.0, 3.0 ];
const x = [ 1.0, 2.0, 3.0 ];
const y = [ 1.0, 2.0, 3.0 ];

gfirstIndexEqual(); // $ExpectError
gfirstIndexEqual( 3 ); // $ExpectError
Expand All @@ -115,17 +115,17 @@ import gfirstIndexEqual = require( './index' );

// Attached to main export is an `ndarray` method which returns a number...
{
var x = [ 1.0, 2.0, 3.0 ];
var y = [ 1.0, 2.0, 3.0 ];
const x = [ 1.0, 2.0, 3.0 ];
const y = [ 1.0, 2.0, 3.0 ];

gfirstIndexEqual.ndarray( x.length, x, 1, 0, y, 1, 0 ); // $ExpectType number
gfirstIndexEqual.ndarray( x.length, new AccessorArray( x ), 1, 0, new AccessorArray( y ), 1, 0 ); // $ExpectType number
}

// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
{
var x = [ 1.0, 2.0, 3.0 ];
var y = [ 1.0, 2.0, 3.0 ];
const x = [ 1.0, 2.0, 3.0 ];
const y = [ 1.0, 2.0, 3.0 ];

gfirstIndexEqual.ndarray( '1', x, 1, 0, y, 1, 0 ); // $ExpectError
gfirstIndexEqual.ndarray( true, x, 1, 0, y, 1, 0 ); // $ExpectError
Expand All @@ -139,7 +139,7 @@ import gfirstIndexEqual = require( './index' );

// The compiler throws an error if the `ndarray` method is provided a second argument which is not a collection...
{
var y = [ 1.0, 2.0, 3.0 ];
const y = [ 1.0, 2.0, 3.0 ];

gfirstIndexEqual.ndarray( 3, 10, 1, 0, y, 1, 0 ); // $ExpectError
gfirstIndexEqual.ndarray( 3, true, 1, 0, y, 1, 0 ); // $ExpectError
Expand All @@ -151,8 +151,8 @@ import gfirstIndexEqual = require( './index' );

// The compiler throws an error if the `ndarray` method is provided a third argument which is not a number...
{
var x = [ 1.0, 2.0, 3.0 ];
var y = [ 1.0, 2.0, 3.0 ];
const x = [ 1.0, 2.0, 3.0 ];
const y = [ 1.0, 2.0, 3.0 ];

gfirstIndexEqual.ndarray( x.length, x, '1', 0, y, 1, 0 ); // $ExpectError
gfirstIndexEqual.ndarray( x.length, x, true, 0, y, 1, 0 ); // $ExpectError
Expand All @@ -166,8 +166,8 @@ import gfirstIndexEqual = require( './index' );

// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number...
{
var x = [ 1.0, 2.0, 3.0 ];
var y = [ 1.0, 2.0, 3.0 ];
const x = [ 1.0, 2.0, 3.0 ];
const y = [ 1.0, 2.0, 3.0 ];

gfirstIndexEqual.ndarray( x.length, x, 1, '1', y, 1, 0 ); // $ExpectError
gfirstIndexEqual.ndarray( x.length, x, 1, true, y, 1, 0 ); // $ExpectError
Expand All @@ -181,7 +181,7 @@ import gfirstIndexEqual = require( './index' );

// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a collection...
{
var x = [ 1.0, 2.0, 3.0 ];
const x = [ 1.0, 2.0, 3.0 ];

gfirstIndexEqual.ndarray( x.length, x, 1, 0, 10, 1, 0 ); // $ExpectError
gfirstIndexEqual.ndarray( x.length, x, 1, 0, true, 1, 0 ); // $ExpectError
Expand All @@ -193,8 +193,8 @@ import gfirstIndexEqual = require( './index' );

// The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a number...
{
var x = [ 1.0, 2.0, 3.0 ];
var y = [ 1.0, 2.0, 3.0 ];
const x = [ 1.0, 2.0, 3.0 ];
const y = [ 1.0, 2.0, 3.0 ];

gfirstIndexEqual.ndarray( x.length, x, 1, 0, y, '1', 0 ); // $ExpectError
gfirstIndexEqual.ndarray( x.length, x, 1, 0, y, true, 0 ); // $ExpectError
Expand All @@ -208,8 +208,8 @@ import gfirstIndexEqual = require( './index' );

// The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number...
{
var x = [ 1.0, 2.0, 3.0 ];
var y = [ 1.0, 2.0, 3.0 ];
const x = [ 1.0, 2.0, 3.0 ];
const y = [ 1.0, 2.0, 3.0 ];

gfirstIndexEqual.ndarray( x.length, x, 1, 0, y, 1, '1' ); // $ExpectError
gfirstIndexEqual.ndarray( x.length, x, 1, 0, y, 1, true ); // $ExpectError
Expand All @@ -223,8 +223,8 @@ import gfirstIndexEqual = require( './index' );

// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
{
var x = [ 1.0, 2.0, 3.0 ];
var y = [ 1.0, 2.0, 3.0 ];
const x = [ 1.0, 2.0, 3.0 ];
const y = [ 1.0, 2.0, 3.0 ];

gfirstIndexEqual.ndarray(); // $ExpectError
gfirstIndexEqual.ndarray( 3 ); // $ExpectError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ int main( void ) {

<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->


<section class="related">

</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
// MAIN //

/**
* Returns the standard deviation for an anglit distribution with location `mu` and scale `sigma`.

Check warning on line 29 in lib/node_modules/@stdlib/stats/base/dists/anglit/stdev/lib/native.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "anglit"
*
* @private
* @param {number} mu - location parameter
* @param {PositiveNumber} sigma - scale parameter
* @returns {number} standard deviation
* @returns {PositiveNumber} standard deviation
*
* @example
* var y = stdev( 0.0, 1.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ tape( 'the function evaluates the pdf for `x` given large parameter `d2` (tested
t.end();
});

tape( 'the function evaluates the pdf for `x` given large `d1` and `d2` (tested against the Boost C++ library', opts, function test( t ) {
tape( 'the function evaluates the pdf for `x` given large `d1` and `d2` (tested against the Boost C++ library)', opts, function test( t ) {
var expected;
var d1;
var d2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* // returns ~0.667
*
* var myCDF = cdf.factory( 1.0, 1.0 );
* var y = myCDF( 2.0 );
* y = myCDF( 2.0 );
* // returns ~0.667
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* // returns 1.0
*
* var myQuantile = quantile.factory( 1.0, 1.0 );
* var y = myQuantile( 0.5 );
* y = myQuantile( 0.5 );
* // returns 1.0
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ var addon = require( './../src/addon.node' );
// MAIN //

/**
* Evaluates the natural logarithm of the cumulative distribution function (CDF) for a lognormal distribution with mean `mu` and standard deviation `sigma` at a value `x`.
* Evaluates the natural logarithm of the cumulative distribution function (CDF) for a lognormal distribution with location parameter `mu` and scale parameter `sigma` at a value `x`.
*
* @private
* @param {number} x - input value
* @param {number} mu - mean
* @param {NonNegativeNumber} sigma - standard deviation
* @param {number} mu - location parameter
* @param {NonNegativeNumber} sigma - scale parameter
* @returns {number} evaluated logCDF
*
* @example
Expand All @@ -55,7 +55,7 @@ var addon = require( './../src/addon.node' );
* // returns NaN
*
* @example
* // Negative standard deviation:
* // Negative scale parameter:
* var y = logcdf( 2.0, 0.0, -1.0 );
* // returns NaN
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ double stdlib_base_dists_lognormal_logcdf( const double x, const double mu, cons
}
lx = stdlib_base_ln( x );
if ( sigma == 0.0 ) {
return (lx < mu) ? STDLIB_CONSTANT_FLOAT64_NINF : 0.0;
return ( lx < mu ) ? STDLIB_CONSTANT_FLOAT64_NINF : 0.0;
}
z = ( lx - mu ) / sigma;

Expand Down
Loading