I can't edit entry (need to change from int to float)


#1

Hello, I have an entry in my .h5 file which needs to be changed from 0 to 2016412.575886099 , but somehow that doesn’t work, only integers work, and writing via Python code also doesn’t work…


#2

Possibly the HDF5 dataset has a integer datatype. You need to create a dataset with float | double | long double datatype, then copy the original dataset over, and now you can make the desired cell update with floatvalue.

Follow this tutorial to learn more on datatypes.


#3

How can I do this? Nothing I found on the web worked for me. I now created the h5 file again (with some other weird problems on the way which magically disappeared when restarting the Notebook), but it would be still nice to know …


#4

Did you try reading the platform specific documentation?

Follow this link to the HDF5 C library documentation, when working with python try this link, for Julia this one is a good start, and here is my work on C++


#5

I use Python. But the explanations in the documentation didn’t help me. When I tried to create groups or datasets, it either had no effect or got me an error message saying that such a group already exists. (Although, when viewed in HDF Viewer, nothing could be seen.)


#6

Here is a SO article on how to build a minimum working example that demonstrates the issue. You should upload your MWE to some public place: github, etc, or attach the gzip here to attract audience.

The only way to confirm a problem is by running the MWE or Self Short Contained Correct Example.


#7

True. The problem is that somehow things work now, after I restarted the kernel… if it happens again I will post a simple example!