Skip to content
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

Efficient way to convert a structured numpy array into a 3d array. #113

Merged
1 commit merged into from
Jan 9, 2024

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Dec 4, 2023

Efficient way to convert a structured numpy array into a 3d array.

This CL uses a more efficient way to convert the numpy structured array removing the need to copy the array into memory as a list. Using .view() doesn't seem to change the data buffer and should be more memory efficient.

Also adds checks for requested vs returned data types from EE. Will try to use requested type but will warn user if conversion is not possible then use returned EE type.

Closes #9

Copy link

google-cla bot commented Dec 4, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@copybara-service copybara-service bot force-pushed the test_587594128 branch 6 times, most recently from 4ec7f29 to 39b2c25 Compare January 9, 2024 04:53
This CL uses a more efficient way to convert the numpy structured array removing the need to copy the array into memory as a list. Using `.view()` doesn't seem to change the data buffer and should be more memory efficient.

Also adds checks for requested vs returned data types from EE. Will try to use requested type but will warn user if conversion is not possible then use returned EE type.

Closes #9

PiperOrigin-RevId: 596786971
@copybara-service copybara-service bot closed this pull request by merging all changes into main in f05e82b Jan 9, 2024
@copybara-service copybara-service bot deleted the test_587594128 branch January 9, 2024 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Find an efficient way to convert a structured numpy array into a 3d array.
0 participants