You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm not sure how cnpy is supposed to work in the following case:
Let's say I have a vector of structs. The struct is made of an int field and a double field. The is supposed to be translated into a 2D matrix, with each column having a different variable type. How would you use cnpy to save that structure into a npy file?
In Python, with Numpy, it's possible to use a record array, as described in this thread.
The text was updated successfully, but these errors were encountered:
Thanks @eedalong .
I ended up going with another approach, I've converted the structs vector into multiple vectors of the same type and saved them as an npz file. My only problem now is that I couldn't manage to save a vector of strings using cnpy.
yeah,i guess that is because string'e length is variant, so if we want serialize a vector of strings, we need to serialize it as
[length1][string1][length2][string2][length3][string3]
Hi, I'm not sure how cnpy is supposed to work in the following case:
Let's say I have a vector of structs. The struct is made of an int field and a double field. The is supposed to be translated into a 2D matrix, with each column having a different variable type. How would you use cnpy to save that structure into a npy file?
In Python, with Numpy, it's possible to use a record array, as described in this thread.
The text was updated successfully, but these errors were encountered: