'TTree' object has no attribute 'AsMatrix'

ROOT Version : 6.27/01
Platform: Ubuntu(WSL) in Windows

Hi !,
I am currently working with a TMVA file in python and loaded the signal tree like:
signalTree = inputFile.Get(‘sig_tree’)
backgroundTree = inputFile.Get(‘bkg_tree’)

signalTree.Print();
This is working fine but when I try to write,

data = signalTree.AsMatrix([“mjj”]); this error is coming

AttributeError: ‘TTree’ object has no attribute ‘AsMatrix’

I found someone facing similar issue, but I saw that the isssue was mainly because of the old version, but I have just built ROOT from sources few days back and my version is completely new!

Hi @Sayandeep_Ghosh ,
TTree.AsMatrix was deprecated in v6.24 and removed in v6.26, see ROOT Version 6.26 Release Notes

Cheers,
Enrico

1 Like