# Segment Violation Error in PyROOT

**URL:** <https://root-forum.cern.ch/t/segment-violation-error-in-pyroot/51107>\
**Category:** Newbie\
**Created:** [August 8, 2022, 2:25pm UTC](https://root-forum.cern.ch/t/segment-violation-error-in-pyroot/51107 "2022-08-08T14:25:55Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [August 9, 2022, 11:24am UTC](https://root-forum.cern.ch/t/segment-violation-error-in-pyroot/51107/6 "2022-08-09T11:24:03Z")

</div>

I guess you need:  
`chn0 = arr.array('l', [0]) # one "Int_t"`  
and then:  
`hist.Fill(chn0[0], ticks)`

Please do read the links given in this post:

> [@Looping to create new Branches with different data](https://root-forum.cern.ch/t/looping-to-create-new-branches-with-different-data/51044/4):
>
> array('i', [0]) is a 2-bytes signed integer so you need "leafname/S" [array - Efficient arrays of numeric values](https://docs.python.org/3/library/array.html)[TTree → Add a column (“branch”) holding fundamental types and arrays thereof](https://root.cern/doc/master/classTTree.html#addcolumnoffundamentaltypes)

---

_[View the full topic](https://root-forum.cern.ch/t/segment-violation-error-in-pyroot/51107)._
