RDataFrame snapshot convert double to float

Hello,

I have a RDataFrame object whose column types are Double_t. I am trying to apply a TMVA xml file in Python using the TMVA::Experimental::RReader method. However, this does not work because the current implementation only supports floats.

My question is, is there an easy, efficient way to convert these columns of doubles to floats? I suppose I can redefine each and every column but just wondering if there might be a less cumbersome method.

ROOT Version: 6.28/00

Dear @kyoon ,

Indeed, as things stand according to your description, it seems that the best option is using Redefine. That’s exactly its purpose, to recompute values of an existing column keeping the original name. Then you can Snapshot as usual.

I would argue that what you are reporting is a limitation in RReader so that’s the part that should be addressed. I will invite @moneta in the conversation to understand if this can be improvede and how feasible it is.

Cheers,
Vincenzo

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