@@ -752,23 +752,23 @@ Status SerializeObject(PyObject* context, PyObject* sequence, SerializedPyObject
752
752
return Status::OK ();
753
753
}
754
754
755
- Status SerializeTensor (std::shared_ptr<Tensor> tensor, SerializedPyObject* out) {
755
+ Status SerializeNdarray (std::shared_ptr<Tensor> tensor, SerializedPyObject* out) {
756
756
std::shared_ptr<Array> array;
757
757
SequenceBuilder builder;
758
- RETURN_NOT_OK (builder.AppendTensor (static_cast <int32_t >(out->tensors .size ())));
758
+ RETURN_NOT_OK (builder.AppendNdarray (static_cast <int32_t >(out->tensors .size ())));
759
759
out->tensors .push_back (tensor);
760
760
RETURN_NOT_OK (builder.Finish (nullptr , nullptr , nullptr , nullptr , &array));
761
761
out->batch = MakeBatch (array);
762
762
return Status::OK ();
763
763
}
764
764
765
- Status WriteTensorHeader (std::shared_ptr<DataType> dtype,
766
- const std::vector<int64_t >& shape, int64_t tensor_num_bytes,
767
- io::OutputStream* dst) {
765
+ Status WriteNdarrayHeader (std::shared_ptr<DataType> dtype,
766
+ const std::vector<int64_t >& shape, int64_t tensor_num_bytes,
767
+ io::OutputStream* dst) {
768
768
auto empty_tensor = std::make_shared<Tensor>(
769
769
dtype, std::make_shared<Buffer>(nullptr , tensor_num_bytes), shape);
770
770
SerializedPyObject serialized_tensor;
771
- RETURN_NOT_OK (SerializeTensor (empty_tensor, &serialized_tensor));
771
+ RETURN_NOT_OK (SerializeNdarray (empty_tensor, &serialized_tensor));
772
772
return serialized_tensor.WriteTo (dst);
773
773
}
774
774
0 commit comments