numpy-protobuf
numpy-protobuf copied to clipboard
Request: Usage Examples in the readme
I'd like to try this out. Can you post usage examples of numpy protobuff?
As far as I can tell from a glance at the source, it's mostly a proto object description, not code to convert to and from it. So there's not much "usage" to document, i.e. no functions that can be called. @telamonian Is that right?
@mverleg As I say in the README, all that's currently here is an ndarray
message type. You can use this message type in your own .proto
files by including npbuf/type/ndarray.proto
.
If there's interest, I can go ahead and explore the rest of the plan I laid out in the README, namely to make ndarray
into a first-class datatype in at least the Python implementation of protobuf. Alternatively, I can just add some basic functions to handle serialization/deserializaiton of arrays
An example showing serialization/deserializaiton of arrays would be nice.
I am trying to read the following directly to one or two numpy arrays. Would that be possible?
message Datapoint {
int64 ts = 1;
double x = 2;
}
message Datapoints {
repeated Datapoint datapoints = 1;
}