Skip to content

Commit

Permalink
add type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
nbren12 committed Sep 8, 2024
1 parent c4c47a9 commit 397a460
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion earth2grid/_regrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import math
from typing import Dict

import einops
import netCDF4 as nc
Expand Down Expand Up @@ -43,7 +44,7 @@ def forward(self, z):
return output

@staticmethod
def from_state_dict(d):
def from_state_dict(d: Dict[str, torch.Tensor]) -> "Regridder":
n, p = d["index"].shape
regridder = Regridder(n, p)
regridder.load_state_dict(d)
Expand Down

0 comments on commit 397a460

Please sign in to comment.