ext/numo/narray/gen/tmpl_bit/bit_reduce.c in numo-narray-0.9.0.4 vs ext/numo/narray/gen/tmpl_bit/bit_reduce.c in numo-narray-0.9.0.5

- old
+ new

@@ -89,34 +89,34 @@ } } } /* -<% case method +<% case name when /^any/ %> Return true if any of bits is one (true). <% when /^all/ %> Return true if all of bits are one (true). <% end %> If argument is supplied, return Bit-array reduced along the axes. - @overload <%=op_map%>([axis,..]) - @param [Integer] axis axes to be reduced. + @overload <%=op_map%>(axis:nil) + @param [Integer,Array,Range] axis axes to be reduced. @return [Numo::Bit] . */ static VALUE -<%=c_func%>(int argc, VALUE *argv, VALUE self) +<%=c_func(-1)%>(int argc, VALUE *argv, VALUE self) { VALUE v, reduce; ndfunc_arg_in_t ain[3] = {{cT,0},{sym_reduce,0},{sym_init,0}}; ndfunc_arg_out_t aout[1] = {{numo_cBit,0}}; ndfunc_t ndf = {<%=c_iter%>, FULL_LOOP_NIP, 3,1, ain,aout}; - reduce = na_reduce_dimension(argc, argv, 1, &self); + reduce = na_reduce_dimension(argc, argv, 1, &self, 0); v = na_ndloop(&ndf, 3, self, reduce, INT2FIX(<%=init_bit%>)); if (argc > 0) { return v; } - v = numo_bit_extract(v); + v = <%=find_tmpl("extract").c_func%>(v); switch (v) { case INT2FIX(0): return Qfalse; case INT2FIX(1): return Qtrue;