# TArrayI::GetAt() returns Double\_t?

**URL:** <https://root-forum.cern.ch/t/tarrayi-getat-returns-double-t/65028>\
**Category:** ROOT\
**Created:** [October 11, 2026, 2:06am UTC](https://root-forum.cern.ch/t/tarrayi-getat-returns-double-t/65028 "2026-10-11T02:06:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![furutaka](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/furutaka/32/25477_2.png) [@furutaka](https://root-forum.cern.ch/u/furutaka)\
**Post date:** [October 11, 2026, 2:06am UTC](https://root-forum.cern.ch/t/tarrayi-getat-returns-double-t/65028/1 "2026-10-11T02:06:35Z")

</div>

* * *

_ROOT Version:_ 6.41.01  
_Platform:_ linuxx8664gcc  
_Compiler:_ c++ (GCC) 16.2.1 20260819 (Red Hat 16.2.1-2) std202002

* * *

Hi…

According to the reference guide for TArrayI which is “Array of integers”, `GetAt(Int_t i)` returns a `Double_t`, not an integer. Why?

Thanks.

---

<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:** [October 11, 2026, 6:17am UTC](https://root-forum.cern.ch/t/tarrayi-getat-returns-double-t/65028/2 "2026-10-11T06:17:59Z")

</div>

The [`TArray`](https://root.cern/doc/master/classTArray.html) base class declares (and it cannot be changed in a derived class):  
[`Double_t TArray::GetAt (Int_t i)`](https://root.cern/doc/master/classTArray.html#a6d4d7d8364d7a93cacd25449eea611e0)  
[`void TArray::SetAt (Double_t v, Int_t i)`](https://root.cern/doc/master/classTArray.html#a0152b1dd62d16b181921f4ed89566ec9)

Note: you can use [`TArrayI`](https://root.cern/doc/master/classTArrayI.html) specific methods:  
[`Int_t TArrayI::At (Int_t i)`](https://root.cern/doc/master/classTArrayI.html#ab10c587b190b766911044660fcfdb034)  
[`void TArrayI::AddAt (Int_t c, Int_t i)`](https://root.cern/doc/master/classTArrayI.html#af3aadeac373a403aa6ccb35aa26910b0)

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [October 25, 2026, 6:18am UTC](https://root-forum.cern.ch/t/tarrayi-getat-returns-double-t/65028/3 "2026-10-25T06:18:31Z")

</div>

Closed on October 25, 2026, 6:18am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
