In defense of TS, the code won’t work with a list per the other topic but should do with a numpy array.
There was a recent thread and bug report about incorrect array converters being selected: the selection is on element size, not element type as numpy arrays don’t carry a typecode as an attribute (but do as part of the buffer info). See:
https://sft.its.cern.ch/jira/browse/ROOT-9040
pyROOT TMultiGraph Segmentation Fault