-
Notifications
You must be signed in to change notification settings - Fork 47
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
Wrong behaviour of NSArray on arm64 (but works on x86_64) #77
Comments
Hi @teticio
(We should use Line 320 in ea4ef7c
Unfortunately, (AFAIK) We don't have a proper way to distinguish a variadic function by looking at its signature. Maybe We can add a list of function that We know that are variadic, or let the user to force it as variadic? What do you think about it @tito? Seems reasonable? Meanwhile, as a workaround, you can easely populate the array by doing something like that: NSMutableArray = autoclass("NSMutableArray")
NSArray = autoclass("NSArray")
mutarray = NSMutableArray.new()
for x in [1, 96, 216, 1]:
mutarray.addObject_(x)
array = NSArray.arrayWithArray_(mutarray)
output_shape = [
array.objectAtIndex_(_).intValue()
for _ in range(array.count())
]
print(output_shape) |
Thanks for this! Funnily enough, I was just reading through the Pyobjus documentation again and I had the same idea for a workaround and I just came back here to grab my code to try it out. Good to know! |
Fixed via #85 |
Problem:
The NSArray contains only the first element of the list on the iPhone. The NSArray is correctly set to the full list on the iPhone emulator however.
iPhone 7: iOS 1.14.1
iPhone 8 emulator: iOS 1.14
main.py:
relevant parts of buildozer.spec:
Any ideas? I am trying to set the shape of a tensor for TensorFlow Lite and I have tried everything I can think of - even casting to a ctypes pointer to ints. I'd be very grateful for any pointers (no pun intended) or workarounds. Thanks!
The text was updated successfully, but these errors were encountered: