-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Batch conversion of timestamps #62
Comments
You would want to write something like on lines 195-205 of G3Vector.cxx, which implements an efficient converter for integers. I might have some time to do it in the next few days, but you are more than welcome to beat me to it. |
nwhitehorn
added a commit
that referenced
this issue
Aug 6, 2021
…ay (#62). This will initialize a G3VectorTime from an array of timestamps (Unix time in G3Units) with maximal efficiency. No reverse buffer-protocol view is available yet because that is more complex.
nwhitehorn
added a commit
that referenced
this issue
Aug 6, 2021
Should be all fixed now -- you can do fancy stuff like this:
And then you can get the numbers back:
The numpy array is also editable in place:
|
This is great, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there a fast way to convert between arrays of G3VectorTime and numpy float arrays? I find myself writing this a lot:
and that's no fun. I am hoping for something like:
The text was updated successfully, but these errors were encountered: