class Array

Public Instance Methods

==(other) click to toggle source
# File lib/tensorflow/extensions/array.rb, line 10
def ==(other)
  if other.kind_of?(Numo::NArray)
    self.eql?(other.to_a)
  else
    original_equals(other)
  end
end
Also aliased as: original_equals
original_equals(other)

Helper method to make writing tests easier. Allows this to work:

assert_equal([1,2], Numo::Array[1,2])

Versus having to do this:

assert_equal([1,2], Numo::Array[1,2].to_a)
Alias for: ==