| 346 | } |
| 347 | |
| 348 | bool pyint2hval(py::int_ obj, CompNode cn, DType dtype, HostTensorArgs& ret) { |
| 349 | if (!dtype.valid()) { |
| 350 | dtype = dtype::Int32(); |
| 351 | } |
| 352 | ret.dtype = dtype; |
| 353 | ret.storage = scalar2storage((dt_int32)obj, cn, dtype); |
| 354 | return true; |
| 355 | } |
| 356 | |
| 357 | bool pyfloat2hval(py::float_ obj, CompNode cn, DType dtype, HostTensorArgs& ret) { |
| 358 | if (!dtype.valid()) { |
no test coverage detected