Method: Numo::NArray.new_like
- Defined in:
- ext/numo/narray/array.c
.new_like(obj) ⇒ Numo::NArray
Generate new unallocated NArray instance with shape and type defined from obj. Numo::NArray.new_like(obj) returns instance whose type is defined from obj. Numo::DFloat.new_like(obj) returns DFloat instance.
469 470 471 472 473 474 475 476 |
# File 'ext/numo/narray/array.c', line 469
VALUE
na_s_new_like(VALUE type, VALUE obj)
{
VALUE newary;
na_composition3(obj, &type, 0, &newary);
return newary;
}
|