8000 Fix wrong array instantiation syntax · christabella/pythonnet.github.io@d00c3b5 · GitHub
[go: up one dir, main page]

Skip to content

Commit d00c3b5

Browse files
authored
Fix wrong array instantiation syntax
Otherwise it throws `TypeError: Cannot convert 10 to System.Int32[]` Documented in pythonnet/pythonnet#788 and pythonnet/pythonnet#251
1 parent 6011055 commit d00c3b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ make it easy to create managed arrays from Python:
327327
```python
328328
from System import Array
329329

330-
myarray = Array[int](10)
330+
myarray = Array[int](range(10))
331331
```
332332

333333
Managed arrays support the standard Python sequence protocols:

0 commit comments

Comments
 (0)
0