Skip to content

Commit

Permalink
Merge pull request #87 from aai-institute/fix/sampler-interface
Browse files Browse the repository at this point in the history
Bugfix: RegularGridSampler input type
  • Loading branch information
samuelburbulla authored Mar 12, 2024
2 parents 54f01ba + 7575f24 commit bc5c0ef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/continuity/discrete/regular_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import torch
from typing import Union

from .box_sampler import BoxSampler

Expand Down Expand Up @@ -45,7 +46,10 @@ class RegularGridSampler(BoxSampler):
"""

def __init__(
self, x_min: torch.Tensor, x_max: torch.Tensor, prefer_more_samples: bool = True
self,
x_min: Union[torch.Tensor, list],
x_max: Union[torch.Tensor, list],
prefer_more_samples: bool = True,
):
super().__init__(x_min, x_max)
self.prefer_more_samples = prefer_more_samples
Expand Down

0 comments on commit bc5c0ef

Please sign in to comment.