Although immediate differences will not be visible when not reopening files in __getitem__ , there is a great probability of having spurious Nan values inside the retrieved content, which will definitely cause problems during using hdff5 datasets with Pytorch. For reference, one can see this stackoverflow post 73 . As a sidenote, I have not tried compiling from source code.