Negative dimensions are not allowed

I have a negative data in my .ROOT extension file and I want to see it or I want it to turn it into positive. Although I run the np.abs command, I still get the same error, do you have any suggestions?
(I got this error after merging a 60GB file. There was no such problem when merging and using 3 files before).

Best regards.

Dear @Emirhan_Akkus ,

Thanks for reaching out to the ROOT forum. I believe your question is related to uproot, which is not the same project as ROOT. Nonetheless, let me try to help you. From the first screenshot, it seems you are running into an overflow issue, that is the representation of the scalar type of data you are trying to sum is going beyond its maximum value (this depends on the data type, i.e. is it an int, or a std::uint64_t for example). You can check the maximum values of every type via the std::numeric_limits<MYTYPE>::max template. Also you could try to print out the values of every single np.array(rootFile[key]) conversion you are performing in that for loop and see at which point the errors start appearing.

For what concerns the merging part, how are you doing that? Usually merging of TTree datasets is handled via the hadd command in ROOT, is that the case for you?

For questions more specifically related to the errors reported by uproot, I suggest you contact uproot developers directly.


Dear @vpadulan ,
Thank you for replying.
I did it using the hadd command for files with .ROOT extension. There are different data types in the data and I think I also get a size mismatch error. Since the code of the place where the errors are not suitable for me, I just ran the code there to see it. I need to add a code to filter that data or I need to delete the data of the parameter with the error from my file, I don’t know if such a thing is possible.

Best regards.

output.root (3 file combinations)

jetmerged.root ( 22 file combinations)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.