# Warning: Converting an array to var would cause array rank reduction and is not permitted

**URL:** <https://forum.dynamobim.com/t/warning-converting-an-array-to-var-would-cause-array-rank-reduction-and-is-not-permitted/84290>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [December 20, 2022, 7:37am UTC](https://forum.dynamobim.com/t/warning-converting-an-array-to-var-would-cause-array-rank-reduction-and-is-not-permitted/84290 "2022-12-20T07:37:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishalrana007](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@vishalrana007](https://forum.dynamobim.com/u/vishalrana007)\
**Post date:** [December 20, 2022, 7:37am UTC](https://forum.dynamobim.com/t/warning-converting-an-array-to-var-would-cause-array-rank-reduction-and-is-not-permitted/84290/1 "2022-12-20T07:37:48Z")

</div>

i am trying to use a list of element instead of just one. but it gives me this warning: Warning: Converting an array to var would cause array rank reduction and is not permitted. I am stuck and have no clue what to do to solve this.

 ![image_2022_12_20T07_39_59_898Z](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/f/cf103addf23ecf3a71c5a0e4fe03dfd112176d9e.png)

---

<div class="post-metadata">

**Author:** ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)\
**Post date:** [December 20, 2022, 10:42am UTC](https://forum.dynamobim.com/t/warning-converting-an-array-to-var-would-cause-array-rank-reduction-and-is-not-permitted/84290/2 "2022-12-20T10:42:02Z")

</div>

@vishalrana007 ,

what are you trying exactly ?

 ![grafik](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/f/1f674f9385659d9eaf3b4cab7c0bfec9775683f0.png)

```auto
# Phython-Standard- und DesignScript-Bibliotheken laden
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

nums = IN[0]

convers = []

for x in nums:
	convers.append(int(x))
OUT = convers

```

---

<div class="post-metadata">

**Author:** ![vishalrana007](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@vishalrana007](https://forum.dynamobim.com/u/vishalrana007)\
**Post date:** [December 20, 2022, 1:46pm UTC](https://forum.dynamobim.com/t/warning-converting-an-array-to-var-would-cause-array-rank-reduction-and-is-not-permitted/84290/3 "2022-12-20T13:46:35Z")

</div>

i have this script which converts model-in-place to family and place them. but it only work for individual item. I am try to tweak it for automatic selection, but these two nodes are not accepting a list of elements.  
I am attaching my dynamo file here:  
[MIP to family.dyn](https://forum.dynamobim.com/uploads/short-url/3cqeKqsjMyohxpYetwc2uaKSxao.dyn) (178.1 KB)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [December 20, 2022, 2:28pm UTC](https://forum.dynamobim.com/t/warning-converting-an-array-to-var-would-cause-array-rank-reduction-and-is-not-permitted/84290/4 "2022-12-20T14:28:55Z")

</div>

Specifying the variable object type and structure only matters if you’re forcing those specific types. Usually this isn’t necessary outside of custom nodes. Forcing the input isn’t going to fix the problem with how the rest of your code handles the data. The logic has to be written to accept your structure.

That being said, you can’t convert a list to a single item. If you want your input to be for a list you need to use `var[]`. If you want your input to be for a list of lists you need to use `var[]..[]`.
