-
Notifications
You must be signed in to change notification settings - Fork 60
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
What happened?
When saving a dndarray with dtype=ht.int32 using save_hdf5, the resulting h5 dataset has the type float32. This can be avoided by specifying dtype=int or dtype=np.int32 (not ht.int32 or torch.int32 as those throw errors) but it should use the dtype of the dndarray by default.
The same issue exists for load_hdf5, where it does not use the type of the h5 dataset but sets it to float32.
Code snippet triggering the error
import heat as ht
a = ht.arange(100, dtype=ht.int32)
ht.save_hdf5(a, 'test.h5', dataset='data')
b = ht.load_hdf5('test.h5', dataset='data')
print(b.dtype)Error message or erroneous outcome
No error just the wrong typeVersion
main (development branch)
Python version
3.12
PyTorch version
2.6
MPI version
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers