-
-
Notifications
You must be signed in to change notification settings - Fork 912
fix: revert uniform implementation and remove unnecessary loop #5314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
d40face
51f1262
a9c0b31
4e770ca
01c8685
e1aab4e
d70146b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -21,8 +21,7 @@ | |||||
// MODULES // | ||||||
|
||||||
var bench = require( '@stdlib/bench' ); | ||||||
var Float64Array = require( '@stdlib/array/float64' ); | ||||||
var uniform = require( '@stdlib/random/base/uniform' ); | ||||||
var uniform = require( '@stdlib/random/array/uniform' ); | ||||||
var isnan = require( '@stdlib/math/base/assert/is-nan' ); | ||||||
var pkg = require( './../package.json' ).name; | ||||||
var median = require( './../lib' ); | ||||||
|
@@ -32,19 +31,15 @@ var median = require( './../lib' ); | |||||
|
||||||
bench( pkg, function benchmark( b ) { | ||||||
var lambda; | ||||||
var len; | ||||||
var y; | ||||||
var i; | ||||||
|
||||||
len =100; | ||||||
lambda = new Float64Array( len ); | ||||||
for ( i = 0; i < len; i++ ) { | ||||||
lambda[ i ] = uniform( 1.0, 10.0); | ||||||
} | ||||||
|
||||||
lambda = uniform( 100, 1.0, 10.0 ); | ||||||
|
lambda = uniform( 100, 1.0, 10.0 ); | |
lambda = uniform( 100, 0.1, 10.0 ); |
Something that doesn’t make a huge difference but would be better to have the same range as the original for consistency. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
absolutely! had suggested something similar in this suggestion must have been overlooked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this extra line.
Same for the native file.