frequenz-floss / frequenz-api-weather

gRPC+protobuf specification and Python bindings for the Frequenz Weather API
MIT License
1 stars 8 forks source link

Change handling of missing data in to_array_vlf method #132

Closed cwasicki closed 2 months ago

cwasicki commented 2 months ago

The implementation of to_array_vlf is problematic since it skips missing keys in any of the dimensions and it is not possible to derive for which key data was missing. For instance, if not all requested validity times are available, the method will only return the available ones and the user does not know for which validity times the data was missing.

This changes the behavior of the method such that the shape always matches the requested size and all entries where data is missing are set to NaN.

In addition to that unit tests for the method are extended.