Skip to content
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

Diagonal(ComponentArray) scalar indexing error #250

Open
vpuri3 opened this issue Mar 6, 2024 · 1 comment
Open

Diagonal(ComponentArray) scalar indexing error #250

vpuri3 opened this issue Mar 6, 2024 · 1 comment

Comments

@vpuri3
Copy link
Contributor

vpuri3 commented Mar 6, 2024

julia> 1f0 .* Diagonal(ComponentArray((;a = CUDA.ones(4))))
ERROR: Scalar indexing is disallowed.
@jonniedie
Copy link
Owner

Hm. Not sure how to fix this on my end because the broadcasted copyto! method for Diagonals does scalar indexing in a for loop. I don't want to special-case this for each matrix type. Might be worth figuring out how

1f0 .* Diagonal(CUDA.ones(4))

works. Maybe that's being special-cased by CUDA?

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

No branches or pull requests

2 participants