# Exporting Numpy list from python3 scripting component

**URL:** <https://discourse.mcneel.com/t/exporting-numpy-list-from-python3-scripting-component/159324>\
**Category:** Grasshopper\
**Tags:** mac, python\
**Created:** [May 3, 2023, 8:12pm UTC](https://discourse.mcneel.com/t/exporting-numpy-list-from-python3-scripting-component/159324 "2023-05-03T20:12:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bachman](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/bachman/32/721095_2.png) [@bachman](https://discourse.mcneel.com/u/bachman)\
**Post date:** [May 3, 2023, 8:12pm UTC](https://discourse.mcneel.com/t/exporting-numpy-list-from-python3-scripting-component/159324/1 "2023-05-03T20:12:30Z")

</div>

Anyone know what to do here? I have a simple python3 scripting component in grasshopper that generates a numpy array and converts to a list. Here’s the code:

```auto
#! python 3
# requirements: numpy
import numpy as np
a=1.234*np.ones(10)
a=a.tolist()

```

All looks OK in a panel component hooked up to the output, but when I try to do any operations (like squaring) on the resulting numbers I get the error: “Invalid Cast: ObjectWrapper \>\> Primitive Data Type”

 ![Screenshot 2023-05-03 at 1.04.22 PM](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/5/4/7/5472de8e8088eb38df4d626af10841115498def9.jpeg)

If, instead, I were to do this:

```auto
#! python 3
# requirements: numpy
import numpy as np
a=1.234*np.ones(10)
a=a.tolist()
a=a[1]

```

then all works fine on the single number that the script outputs.
