lib/tensor_stream/tensor.rb
# Base class that defines a tensor like interface
Base class that defines a tensor like interface
Base class that defines a tensor like interface
def to_math(name_only = false, max_depth = 99, _unused = 0)
      return @name if max_depth.zero? || name_only || @value.nil?
      if @value.is_a?(Array)
        @value.collect { |v| v.is_a?(Tensor) ? v.to_math(name_only, max_depth - 1) : v }
      else
        is_const ? @value : @name
      end
    end
def to_math ( name_only = false , max_depth = 99 , _unused = 0 ) return @name if max_depth . zero? || name_only || @value . nil? if @value . is_a? ( Array ) @value . collect { | v | v . is_a? ( Tensor ) ? v . to_math ( name_only , max_depth - 1 ) : v } else is_const ? @value : @name end end
Base class that defines a tensor like interface
Base class that defines a tensor like interface
name_only
<not_specific>
max_depth
<not_specific>
_unused
<not_specific>