Sha256: f467649baca8d81fe6c923959153e9204c79a2b2e6dba916c9bb96daa0c7bfaf
Contents?: true
Size: 375 Bytes
Versions: 11
Compression:
Stored size: 375 Bytes
Contents
static VALUE numo_<%=tp%>_new_dim0(dtype x) { narray_t *na; VALUE v; dtype *ptr; v = rb_narray_new(cT, 0, NULL); GetNArray(v,na); ptr = (dtype*)(char*)na_get_pointer_for_write(v); *ptr = x; na_release_lock(v); return v; } static VALUE <%=c_func%>(VALUE x) { dtype y; y = m_num_to_data(x); return numo_<%=tp%>_new_dim0(y); }
Version data entries
11 entries across 7 versions & 1 rubygems