google / Xee

An Xarray extension for Google Earth Engine
Apache License 2.0
240 stars 28 forks source link

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

Closed copybara-service[bot] closed 8 months ago

copybara-service[bot] commented 9 months ago

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

google-cla[bot] commented 9 months ago

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.