Skip to content

Commit

Permalink
Remove Array(::AbstractBlockArray) (#88)
Browse files Browse the repository at this point in the history
* Remove Array(::AbstractBlockArray)

* Remove Array from docs
  • Loading branch information
dlfivefifty authored Jun 6, 2019
1 parent 7558ffa commit 92250ef
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
1 change: 0 additions & 1 deletion docs/src/lib/public.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ blocksizes
getblock
getblock!
setblock!
Array
blockcheckbounds
```

Expand Down
21 changes: 0 additions & 21 deletions src/abstractblockarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -275,27 +275,6 @@ end
return true
end


"""
Array(A::AbstractBlockArray)
Returns the array stored in `A` as a `Array`.
```jldoctest; setup = quote using BlockArrays end
julia> A = BlockArray(ones(2,3), [1,1], [2,1])
2×2-blocked 2×3 BlockArray{Float64,2}:
1.0 1.0 │ 1.0
──────────┼─────
1.0 1.0 │ 1.0
julia> Array(A)
2×3 Array{Float64,2}:
1.0 1.0 1.0
1.0 1.0 1.0
```
"""
function Base.Array(A::AbstractBlockArray) end

# Convert to @generated...
@propagate_inbounds Base.getindex( block_arr::AbstractBlockArray{T, N}, block::Block{N}) where {T,N} = getblock(block_arr, block.n...)
@propagate_inbounds Base.setindex!(block_arr::AbstractBlockArray{T, N}, v, block::Block{N}) where {T,N} = setblock!(block_arr, v, block.n...)
Expand Down

0 comments on commit 92250ef

Please sign in to comment.