Add dtype argument to fix Nan in padding
The problem: currently, the sampler crashes when there are integer NaNs.
The fix: an option of dtype
is added in load_sample
(at https://gitlab.kitware.com/usman.rafique/ndsampler/-/blob/fix_padding/ndsampler/coco_sampler.py#L451).
def load_sample(self, tr, with_annots=True, visible_thresh=0.0, pad=None,
padkw={'mode': 'constant'}, dtype=None, **kw):
If there are int Nans, load_sample
should be called with dtype=np.float64
.