Module: TensorStream::MonkeyPatch

Included in:
Array, Float, Integer
Defined in:
lib/tensor_stream/monkey_patches/patch.rb

Overview

various monkey patches to FixNum types

Instance Method Summary collapse

Instance Method Details

#shapeObject



5
6
7
# File 'lib/tensor_stream/monkey_patches/patch.rb', line 5

def shape
  TensorStream.shape_eval(self)
end

#t(name = nil, dtype: nil) ⇒ Object



9
10
11
# File 'lib/tensor_stream/monkey_patches/patch.rb', line 9

def t(name = nil, dtype: nil)
  TensorStream.convert_to_tensor(self, name: name, dtype: dtype)
end