Skip to content

Commit

Permalink
Don't splat dims tuples in similar
Browse files Browse the repository at this point in the history
This leads to a confusion between 0-dimensional arrays and keeping the size the same
  • Loading branch information
mbauman committed May 12, 2016
1 parent 325ac31 commit acafa9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/reshapedarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ size_strides(out::Tuple) = out
size(A::ReshapedArray) = A.dims
size(A::ReshapedArray, d) = d <= ndims(A) ? A.dims[d] : 1
similar(A::ReshapedArray, eltype::Type) = similar(parent(A), eltype, size(A))
similar(A::ReshapedArray, eltype::Type, dims::Dims) = similar(parent(A), eltype, dims...)
similar(A::ReshapedArray, eltype::Type, dims::Dims) = similar(parent(A), eltype, dims)
linearindexing{R<:ReshapedArrayLF}(::Type{R}) = LinearFast()
parent(A::ReshapedArray) = A.parent
parentindexes(A::ReshapedArray) = map(s->1:s, size(parent(A)))
Expand Down

0 comments on commit acafa9b

Please sign in to comment.