Skip to content
Closed
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 @@ -22,8 +22,5 @@ var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
var logEachMap = require( '@stdlib/console/log-each-map' );
var abs = require( './../lib' );

var x = discreteUniform( 100, -100, 100, {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conversely, the float64 dtype also signifies that abs accepts and expects double-precision floating-point numbers. As such, I am not convinced that the proposed change is warranted.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification — I understand your point.

I see that explicitly specifying float64 in the example serves as documentation of the expected input type for abs, rather than being incidental to the example output.

Given that, I agree the change is not warranted. I’m happy to close the PR.

Thanks for taking the time to explain the rationale.

'dtype': 'float64'
});

var x = discreteUniform( 100, -100, 100 );
logEachMap( 'abs(%d) = %d', x, abs );