Skip to content

Fix wrong array instantiation syntax #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

christabella
Copy link
Contributor

Otherwise it throws TypeError: Cannot convert 10 to System.Int32[]

Documented in pythonnet/pythonnet#788 and pythonnet/pythonnet#251

Otherwise it throws `TypeError: Cannot convert 10 to System.Int32[]`

Documented in pythonnet/pythonnet#788 and pythonnet/pythonnet#251
@dnfadmin
Copy link

dnfadmin commented Nov 22, 2020

CLA assistant check
All CLA requirements met.

@lostmsu
Copy link
Member

lostmsu commented Nov 23, 2020

I think the sample is correct, and Python.NET itself needs to be fixed if this is not working. This code looks like it is supposed to create an array of 10 int. E.g. it should be equivalent of new int[10].

myarray = Array[int](10)

@lostmsu
Copy link
Member

lostmsu commented Nov 24, 2020

Published fix for Python.NET here: pythonnet/pythonnet#1291

@christabella
Copy link
Contributor Author

Thank you for pushing the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants