I'm using the Python .Net library so I don't have access to List<T>. Currently when I try to initialize an Array an error is thrown.
The documentation has an example that is throwing an error from the latest code base.
Ex:
from System import Array
myarray = Array[int](10) #TypeError: Cannot convert 10 to System.Int32[]
The following works on 64bit but not on 32bit!
myarray = Array[int]([10]) #OverflowError: value too large to convert
I also get an error when I execute Array[int](10). It looks like the expected argument isn't the size, but a Python list. The following works for me:
py_array = [1, 2, 3]
net_array = Array[int](py_array)
Now, net_array.Length should return 3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With