ext/numo/narray/gen/tmpl/rand.c in numo-narray-0.9.1.4 vs ext/numo/narray/gen/tmpl/rand.c in numo-narray-0.9.1.5
- old
+ new
@@ -111,17 +111,19 @@
@param [Numeric] low lower inclusive boundary of random numbers. (default=0)
@param [Numeric] high upper exclusive boundary of random numbers. (default=1 or 1+1i for complex types)
@return [Numo::<%=class_name%>] self.
@example
Numo::DFloat.new(6).rand
- => Numo::DFloat#shape=[6]
- [0.0617545, 0.373067, 0.794815, 0.201042, 0.116041, 0.344032]
+ # => Numo::DFloat#shape=[6]
+ # [0.0617545, 0.373067, 0.794815, 0.201042, 0.116041, 0.344032]
+
Numo::DComplex.new(6).rand(5+5i)
- => Numo::DComplex#shape=[6]
- [2.69974+3.68908i, 0.825443+0.254414i, 0.540323+0.34354i, 4.52061+2.39322i, ...]
+ # => Numo::DComplex#shape=[6]
+ # [2.69974+3.68908i, 0.825443+0.254414i, 0.540323+0.34354i, 4.52061+2.39322i, ...]
+
Numo::Int32.new(6).rand(2,5)
- => Numo::Int32#shape=[6]
- [4, 3, 3, 2, 4, 2]
+ # => Numo::Int32#shape=[6]
+ # [4, 3, 3, 2, 4, 2]
*/
static VALUE
<%=c_func(-1)%>(int argc, VALUE *args, VALUE self)
{
rand_opt_t g;