Skip to content
This repository has been archived by the owner on May 4, 2019. It is now read-only.

Commit

Permalink
Remove method redundant with ==(::AbstractArray{>:Null, ::AbstractArr…
Browse files Browse the repository at this point in the history
…ay{>:Null})
  • Loading branch information
nalimilan committed Oct 14, 2017
1 parent 96f7b05 commit 622613a
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/operators.jl
Expand Up @@ -387,36 +387,6 @@ function (==)(a::DataArray, b::DataArray)
has_null ? null : true
end

function (==)(a::AbstractDataArray, b::AbstractDataArray)
size(a) == size(b) || return false
has_null = false
for i = 1:length(a)
if isnull(a[i]) || isnull(b[i])
has_null = true
else
a[i] == b[i] || return false
end
end
has_null ? null : true
end

@swappable function (==)(a::AbstractDataArray, b::AbstractArray)
size(a) == size(b) || return false
has_null = false
for i = 1:length(a)
if isnull(a[i])
has_null = true
else
a[i] == b[i] || return false
end
end
has_null ? null : true
end

# ambiguity
@swappable (==)(a::DataArray, b::AbstractDataArray) =
invoke(==, Tuple{AbstractDataArray,AbstractDataArray}, a, b)

@swappable function (==)(a::DataArray, b::AbstractArray)
size(a) == size(b) || return false
adata = a.data
Expand Down

0 comments on commit 622613a

Please sign in to comment.