miranov25 / RootInteractive

5 stars 12 forks source link

Rdataframe makeDefine #298

Closed pl0xz0rz closed 1 year ago

pl0xz0rz commented 1 year ago

This PR: -Adds error handling to range filters in javascript, console logging a warning if the range is empty -Adds support for global functions and arrays of arrays in makeDefine Example:

makeDefine("C","cos(A[1:10])-B[:20:2,1:3]", None,3, True)

Output

Implementation:

 auto C(){
    RVec<RVec<double>> result(10);
    for(size_t i=0; i<10; i++){
        RVec<double> result_1(2);
    for(size_t i_1=0; i_1<2; i_1++){
        result_1[i_1] = (cos(A[1+i*1])) - (B[0+i*2][1+i_1*1]);
    }
    result[i] = result_1;
    }

}

Dependencies ['B', 'A']

miranov25 commented 1 year ago

Comments: The test line should be removed from the RDataFrame_Array.py makeDefine("C","cos(A[1:10])-B[:20:2,1:3]", None,3, True)

Import ROOT

Add things to the test_RDataFrame_Array.py

miranov25 commented 1 year ago

Merging