# 'TTree' object has no attribute 'AsMatrix'

**URL:** <https://root-forum.cern.ch/t/ttree-object-has-no-attribute-asmatrix/49357>\
**Category:** TMVA\
**Created:** [March 25, 2022, 10:49am UTC](https://root-forum.cern.ch/t/ttree-object-has-no-attribute-asmatrix/49357 "2022-03-25T10:49:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sayandeep\_Ghosh](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/sayandeep_ghosh/32/29173_2.png) [@Sayandeep\_Ghosh](https://root-forum.cern.ch/u/Sayandeep_Ghosh)\
**Post date:** [March 25, 2022, 10:49am UTC](https://root-forum.cern.ch/t/ttree-object-has-no-attribute-asmatrix/49357/1 "2022-03-25T10:49:33Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [March 25, 2022, 10:51am UTC](https://root-forum.cern.ch/t/ttree-object-has-no-attribute-asmatrix/49357/2 "2022-03-25T10:51:44Z")

</div>

Hi @Sayandeep_Ghosh ,  
`TTree.AsMatrix` was deprecated in v6.24 and removed in v6.26, see [ROOT Version 6.26 Release Notes](https://root.cern/doc/v626/release-notes.html#deprecation-removal-backward-incompatibilities)

Cheers,  
Enrico
