Primary competition visual

CGIAR Crop Yield Prediction Challenge

Helping Kenya
$3 000 USD
Completed (~5 years ago)
Prediction
Earth Observation
890 joined
195 active
Starti
Oct 21, 20
Closei
Feb 07, 21
Reveali
Feb 07, 21
NPY files load as 'uint32'
Data · 22 Jan 2021, 00:47 · 2

Numpy loads the '.npy' files as 'uint32' by default. While the individual channels may always be integers, is it true that there will be no '-ve' values? Looking at Terraclim fields such as Tmmn/Tmmx, the range seems to be, for example between -770 to +387.

@organizers is there a reason why the image arrays were stored as dtype 'uint32'?

Discussion 2 answers

The data comes from different sources. At some point they are combined as bands of a single image, then exported as raster data, then converted to the saved numpy arrays with:

src = rasterio.open(filename)

arr = src.read()

with open(save_name, 'wb') as f:

np.save(f, arr)

I would guess that uint32 is the default somewhere in that pipeline. Most of the variables (image data, rainfall, wind...) are all positive. Temperature can go negative, but in Kenya, even the minimum monthly average temp is ~9 degrees I think. Have you hit issues with the choice of datatype?

22 Jan 2021, 07:27
Upvotes 0

Thanks John. I did not have any issues, just wanted to confirm the data prep was done as intended.