Hi,
When I tried to write 1D float array to one dataset, “test” here, I found a very strange behavior. The python code using h5pyd package is listed below, with “f” as the hdf5 file object.
dset=f.create_dataset(“test”,data=np.linspace(0,100,N_ARRAY), dtype=np.float32)
-
When N_ARRAY <=255, the readback dset is correct as a linear array.
-
When N_ARRAY>256, the readback dset is just random and it’s different if I rewrite it. One example is attached below.
-
Even strangely, when N_ARRAY is sufficiently large, like > 8000, the correct readback can be obtained excepted the very first four numbers, which are just random.
Does anyone know what can cause this issue?
Thanks,
Peiyun
One example at N_ARRAY=256,
[0.00e+00 1.40e-43 0.00e+00 0.00e+00 0.00e+00 0.00e+00 2.80e-45 0.00e+00
0.00e+00 1.26e-43 0.00e+00 0.00e+00 0.00e+00 0.00e+00 2.80e-45 0.00e+00
0.00e+00 1.40e-43 1.40e-45 0.00e+00 0.00e+00 0.00e+00 2.10e-44 0.00e+00
0.00e+00 1.40e-43 2.80e-45 0.00e+00 0.00e+00 0.00e+00 2.10e-44 0.00e+00
0.00e+00 1.51e-43 1.40e-45 0.00e+00 0.00e+00 0.00e+00 2.10e-44 0.00e+00
0.00e+00 1.26e-43 1.40e-45 0.00e+00 0.00e+00 0.00e+00 2.10e-44 0.00e+00
0.00e+00 1.40e-43 1.40e-45 0.00e+00 0.00e+00 0.00e+00 2.38e-44 0.00e+00
0.00e+00 1.40e-43 2.80e-45 0.00e+00 0.00e+00 0.00e+00 2.38e-44 0.00e+00
0.00e+00 1.51e-43 2.80e-45 0.00e+00 0.00e+00 0.00e+00 2.38e-44 0.00e+00
0.00e+00 1.26e-43 2.80e-45 0.00e+00 0.00e+00 0.00e+00 2.38e-44 0.00e+00
0.00e+00 1.40e-43 1.40e-45 0.00e+00 0.00e+00 0.00e+00 2.52e-44 0.00e+00
0.00e+00 1.40e-43 2.80e-45 0.00e+00 0.00e+00 0.00e+00 2.52e-44 0.00e+00
0.00e+00 1.51e-43 4.20e-45 0.00e+00 0.00e+00 0.00e+00 2.52e-44 0.00e+00
0.00e+00 1.26e-43 4.20e-45 0.00e+00 0.00e+00 0.00e+00 2.52e-44 0.00e+00
0.00e+00 1.40e-43 1.40e-45 0.00e+00 0.00e+00 0.00e+00 2.66e-44 0.00e+00
0.00e+00 1.40e-43 4.20e-45 0.00e+00 0.00e+00 0.00e+00 2.66e-44 0.00e+00
0.00e+00 1.51e-43 5.61e-45 0.00e+00 0.00e+00 0.00e+00 2.66e-44 0.00e+00
0.00e+00 1.53e-43 7.01e-45 0.00e+00 0.00e+00 0.00e+00 2.66e-44 0.00e+00
0.00e+00 1.26e-43 7.01e-45 0.00e+00 0.00e+00 0.00e+00 2.66e-44 0.00e+00
0.00e+00 1.40e-45 0.00e+00 0.00e+00 0.00e+00 0.00e+00 2.66e-44 0.00e+00
0.00e+00 1.40e-43 1.40e-45 0.00e+00 0.00e+00 0.00e+00 2.80e-44 0.00e+00
0.00e+00 1.40e-43 2.80e-45 0.00e+00 0.00e+00 0.00e+00 2.80e-44 0.00e+00
0.00e+00 1.51e-43 8.41e-45 0.00e+00 0.00e+00 0.00e+00 2.80e-44 0.00e+00
0.00e+00 1.26e-43 9.81e-45 0.00e+00 0.00e+00 0.00e+00 2.80e-44 0.00e+00
0.00e+00 1.40e-43 5.61e-45 0.00e+00 0.00e+00 0.00e+00 3.36e-44 0.00e+00
0.00e+00 1.26e-43 1.12e-44 0.00e+00 0.00e+00 0.00e+00 3.36e-44 0.00e+00
0.00e+00 1.40e-43 7.01e-45 0.00e+00 0.00e+00 0.00e+00 3.50e-44 0.00e+00
0.00e+00 1.26e-43 1.12e-44 0.00e+00 0.00e+00 0.00e+00 3.50e-44 0.00e+00
0.00e+00 1.40e-43 8.41e-45 0.00e+00 0.00e+00 0.00e+00 3.64e-44 0.00e+00
0.00e+00 1.26e-43 1.26e-44 0.00e+00 0.00e+00 0.00e+00 3.64e-44 0.00e+00
0.00e+00 1.40e-43 9.81e-45 0.00e+00 0.00e+00 0.00e+00 3.78e-44 0.00e+00
0.00e+00 1.26e-43 1.40e-44 0.00e+00 0.00e+00 0.00e+00 3.78e-44 0.00e+00]