-
Notifications
You must be signed in to change notification settings - Fork 85
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
fix: listarray - slicing expects scalars #2069
Conversation
Codecov Report
Additional details and impacted files
|
@agoose77 - I haven't checked if you might have fixed it already? |
Nope, I haven't touched this yet! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, so this bug occurs because CuPy returns 0-D arrays instead of scalars. This is annoying! I think your fix looks like the best option available; we want to convert these to primitive types as soon as possible.
One request: could we change x.item()
for int(x)
? It would be one-less thing that typetracer needs to implement (even though this is a known_data
branch).
555deda
to
bdf29e1
Compare
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just changing int
to item
.
Oops—I just noticed that. I thought your opinion was the other way around. Is it because you'll be swapping method calls for function calls (although As I said, I only have a slight preference for |
I made the case to @ianna to change this, but it was only a mild preference. Given that we both have mild preferences, let's just accept this as-is! |
(@ianna feel free to merge!) |
fixes issue #2068