-
Notifications
You must be signed in to change notification settings - Fork 750
Array.CreateInstance(<type>, System.Int32[]) results in 'TypeError: No method matches given arguments' in v2.5.0 #1187
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
Comments
Hm, @pkthong can you double check your code? When I do |
Python 3.8.0 (default, Nov 6 2019, 16:00:02) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
This at commit-ish (7a9dcfa ) |
Hmm, I'll give that a try locally. The "type" it lists there is correct for Python, |
Running through the changes between v2.4.0 and v2.5.0, the last commit that works for the above test is (4a92d80) |
Okay, then it's indeed #1106. That change actually improved things, in that it allows "proper" use of
to
I'm not yet completely sure whether we want to fix it (we definitely want to keep the feature, maybe we can still allow the direct passing of the array as a fallback), but I acknowledge breakage :) /edit: Actually you can even drop the whole copy-to-.net part and replace it by
|
The above suggestion seems to execute, yet accessing the array results in a System.AccessViolationException. To reproduce this, add the following to the test code. netFoo2 = Array.Copy(netFoo) |
I've gone over my code snippet from before and made fixes similar to what @filmor suggested, although it needed an additional change to support complex data types. I put together a gist this time: https://gist.github.com/robbmcleod/73ca42da5984e6d0e5b6ad28bc4a504e |
I believe this should be fixed in 3.0. Please reopen if not. |
Environment
Details
Array.CreateInstance for multi-dimensional arrays worked fine in v2.4.0. After upgrading to v2.5.0+, an error message gets thrown.
The text was updated successfully, but these errors were encountered: