UMR-CNRM / EPyGrAM

Enhanced Python for Graphics and Analysis of Meteorological fields
Other
14 stars 15 forks source link

support slice type object as value of the only keyword argument of the NetCDF readfield method #21

Closed sradanov closed 4 months ago

sradanov commented 9 months ago

add support of slice type object as value of the only keyword argument of the NetCDF readfield method.

This commit solves an issue that occurs when passing a slice to the "only" keyword argument of the NetCDF readfield method. The error occurs because the restrain_to_index_i_of_dim_d method accepts only a single index i. The proposed solution consists of looping over the the indices in the slice creating a list of data buffers and then concatenating them along dimension d.