Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions src/dataarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,7 @@ end
##
##############################################################################

similar(d::DataArray) = DataArray(similar(d.data), similar(d.na))

function similar{T}(d::DataArray{T}, dims::Int...)
DataArray(Array(T, dims...), trues(dims...))
end

function similar{T}(d::DataArray{T}, dims::Dims)
DataArray(Array(T, dims), trues(dims))
end
similar(d::DataArray, T, dims::Dims) = DataArray(Array(T, dims), trues(dims))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we revert this change? I've edited this on my own and now feel like similar should not initialize the na bit mask.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can change this not to initialize the na mask, but I still think we only need a single similar function with all the arguments. The one- and two-argument versions of similar in Base will just call this one.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true. I'll make that change on my end.


##############################################################################
##
Expand Down
Loading