| 355 | } |
| 356 | |
| 357 | bool pyfloat2hval(py::float_ obj, CompNode cn, DType dtype, HostTensorArgs& ret) { |
| 358 | if (!dtype.valid()) { |
| 359 | dtype = dtype::Float32(); |
| 360 | } |
| 361 | ret.dtype = dtype; |
| 362 | ret.storage = scalar2storage((dt_float32)obj, cn, dtype); |
| 363 | return true; |
| 364 | } |
| 365 | |
| 366 | HostTensorArgs pyobj2hval(py::object obj, CompNode cn, DType dtype) { |
| 367 | HostTensorArgs ret; |
no test coverage detected