Module: TensorStream::PyPorts

Included in:
EmbeddingLookup
Defined in:
lib/tensor_stream/utils/py_ports.rb

Instance Method Summary collapse

Instance Method Details

#floor_div(a, b) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/tensor_stream/utils/py_ports.rb', line 3

def floor_div(a, b)
  if (a.is_a?(Float))
    (a.to_i / b.to_i).to_f
  else
    a / b
  end
end