numpy-protobuf icon indicating copy to clipboard operation
numpy-protobuf copied to clipboard

Request: Usage Examples in the readme

Open isConic opened this issue 5 years ago • 4 comments

I'd like to try this out. Can you post usage examples of numpy protobuff?

isConic avatar Oct 10 '19 15:10 isConic

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 avatar Apr 13 '20 09:04 mverleg

@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

telamonian avatar Apr 13 '20 22:04 telamonian

An example showing serialization/deserializaiton of arrays would be nice.

asher-pembroke avatar Oct 19 '21 18:10 asher-pembroke

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;
}

haakonvt avatar Jul 14 '22 11:07 haakonvt