| 206 | } |
| 207 | |
| 208 | py::array_t<uint16_t> MilStoragePythonReader::read_fp16_data(uint64_t offset) { |
| 209 | |
| 210 | auto fpView = m_reader->GetDataView<MILBlob::Fp16>(offset); |
| 211 | auto intView = MILBlob::Util::SpanCast<const uint16_t>(fpView); |
| 212 | |
| 213 | return py::array_t<uint16_t> (intView.Size(), intView.Data()); |
| 214 | } |
| 215 | |
| 216 | py::array_t<float> MilStoragePythonReader::read_float_data(uint64_t offset) { |
| 217 | return readData<float>(*m_reader, offset); |