lib/torch/tensor.rb in torch-rb-0.2.1 vs lib/torch/tensor.rb in torch-rb-0.2.2

- old
+ new

@@ -2,10 +2,12 @@ class Tensor include Comparable include Inspector alias_method :requires_grad?, :requires_grad + alias_method :ndim, :dim + alias_method :ndimension, :dim def self.new(*args) FloatTensor.new(*args) end @@ -141,9 +143,10 @@ def -@ neg end + # TODO better compare? def <=>(other) item <=> other end # based on python_variable_indexing.cpp