Class: NumericalMDArray
- Includes:
- ComparisonOperators, NumericFunctions, RubyMath
- Defined in:
- lib/mdarray/hierarchy.rb,
lib/mdarray/ruby_math.rb,
lib/mdarray/ruby_numeric_functions.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from MDArray
#binary_operator, #coerced, #float_output_precision, #float_output_suppress_small, #formatter, #id, #inf_str, #int_output_size, #local_index, #local_iterator, #max_line_width, #nan_str, #nc_array, #prefix, #separator, #summary_edge_items, #summary_threshold, #type, #unary_operator
Instance Method Summary collapse
Methods included from FunctionCreation
#make_binary_op, #make_unary_op
Methods included from RubyFunctions
#make_binary_operator, #make_binary_operators, #make_comparison_operator, #make_unary_operator, #make_unary_operators, #ruby_binary_function, #ruby_unary_function
Methods included from NumericFunctions
Methods inherited from MDArray
#[], #[]=, #apply_over_axes, arange, boolean, build, build_from_nc_array, byte, calc_value, char, #compatible, #copy, #csv1d, double, #dtype, #each, #each_cont, #each_slice, #each_with_counter, #flip, float, from_jstorage, fromfunction, function_map_to_csv, #get, #get_as, #get_binary_op, #get_counter, #get_current_index, #get_element_type, #get_index, #get_iterator_fast, #get_next, #get_rank, #get_scalar, #get_shape, #get_size, #get_unary_op, #immutable, init_with, #initialize, int, #jget, linspace, long, make_binary_op, make_unary_op, #ndenumerate, #ndim, #next, ones, #permute, #print, #print0d, #print1d, print_function_map, #printing_defaults, #rank, #reduce, #region, register_function, #reset_traversal, #reshape, #reshape!, rstring, #section, #section?, #section_with_stride, select_function, #set, #set_next, #set_scalar, #shape, short, #size, #slice, string, structure, #to_csv, #to_s, #to_string, #transpose, typed_arange, upcast
Constructor Details
This class inherits a constructor from MDArray
Instance Method Details
#coerce(num) ⇒ Object
28 29 30 31 32 33 |
# File 'lib/mdarray/hierarchy.rb', line 28 def coerce(num) coerced_mdarray = coerced_build(@type, @nc_array) # coerced_mdarray.print # p coerced_mdarray [coerced_mdarray, num] end |