-
Notifications
You must be signed in to change notification settings - Fork 25
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
Support syntax to construct zero, one, and fill BlockArray
s
#34
Comments
After discussions with SimonDansch, we decided it is better use a special type to do this, and so created FillArrays.jl I'm getting this working now: BlockArray(Zeros(6,6), 1:3, 1:3) |
I think using |
Then use |
Only |
This almost works now that |
It would be nice to be able to construct Block arrays that are zeros.
A convention that could be copied is from GPUArrays.jl and override
zeros
,ones
, andfill
:That is, support
zeros(BlockArray{Float32}, 1:4, 1:4)
to construct a 24 x 24BlockMatrix
.I'm not that big a fan of this syntax as it is semantically the same as asking for a
Matrix{CLArray{Float32}}
(any comments @SimonDanisch ?).An alternative would be to use
zero
instead ofzeros
, though then it would be inconsistent with GPUArrays.jl.The text was updated successfully, but these errors were encountered: