Module: NMatrixExtras::ClassMethods
- Defined in:
- lib/nmatrix_extras/nmatrix.rb
Instance Method Summary collapse
Instance Method Details
#ones_like(nm) ⇒ Object
188 189 190 |
# File 'lib/nmatrix_extras/nmatrix.rb', line 188 def ones_like(nm) NMatrix.ones(nm.shape, nm.dtype) end |
#zeros_like(nm) ⇒ Object
192 193 194 |
# File 'lib/nmatrix_extras/nmatrix.rb', line 192 def zeros_like(nm) NMatrix.zeros(nm.stype, nm.shape, nm.dtype) end |