# How to pass double\* of C++ in python?

**URL:** https://discourse.itk.org/t/how-to-pass-double-of-c-in-python/6716
**Category:** Beginner Questions
**Tags:** python
**Created:** [June 23, 2024, 4:02am UTC](https://discourse.itk.org/t/how-to-pass-double-of-c-in-python/6716 "2024-06-23T04:02:27Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![guo7212](https://discourse.itk.org/letter_avatar_proxy/v4/letter/g/7ab992/32.png) [@guo7212](https://discourse.itk.org/u/guo7212)
#### Post date: [June 23, 2024, 4:02am UTC](https://discourse.itk.org/t/how-to-pass-double-of-c-in-python/6716/1 "2024-06-23T04:02:27Z")

</div>

Hi all,  
I tried to use itk-python. There is a function in itk::PointSet, which has a parameter of double\* in C++. I want to know how to set it in Python. The error message is as follows:

```auto
TypeError: in method 'itkPointSetD3_GetPointData', argument 3 of type 'double *'

```

What I have tried are list, numpy.array. They can’t be used.

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [June 24, 2024, 1:25pm UTC](https://discourse.itk.org/t/how-to-pass-double-of-c-in-python/6716/2 "2024-06-24T13:25:08Z")

</div>

@pranjal_sahu1 @Pranjal_Sahu Is this expected to work?

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [July 23, 2024, 3:14am UTC](https://discourse.itk.org/t/how-to-pass-double-of-c-in-python/6716/3 "2024-07-23T03:14:31Z")

</div>

@guo7212 which function is this?

---

<div class="post-metadata">

### Author: ![guo7212](https://discourse.itk.org/letter_avatar_proxy/v4/letter/g/7ab992/32.png) [@guo7212](https://discourse.itk.org/u/guo7212)
#### Post date: [July 25, 2024, 7:26am UTC](https://discourse.itk.org/t/how-to-pass-double-of-c-in-python/6716/4 "2024-07-25T07:26:00Z")

</div>

```auto
//class
itk::PointSet
//function
bool GetPointData (PointIdentifier, PixelType *) const

```

PixelType could be `float` or `double`. In my case above, it’s `double`.
