Skip to content

Commit

Permalink
revert selectdim
Browse files Browse the repository at this point in the history
  • Loading branch information
cossio committed Jun 16, 2020
1 parent 1dbaf32 commit 9078f85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/data/dataloader.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function _nobs(data::Union{Tuple, NamedTuple})
return n
end

_getobs(data::AbstractArray, i) = selectdim(data, ndims(data), i)
_getobs(data::AbstractArray, i) = data[ntuple(i -> Colon(), Val(ndims(data) - 1))..., i]
_getobs(data::Union{Tuple, NamedTuple}, i) = map(Base.Fix2(_getobs, i), data)

Base.eltype(::DataLoader{D}) where D = D

0 comments on commit 9078f85

Please sign in to comment.