Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
firstindex(::AbstractDataContainer)
This enables the `begin` keyword when indexing an `AbstractDataContainer`. Note that `end` already worked when indexing because of `lastindex(::AbstractDataContainer)` is already implemented. For example: ```julia julia> using MLDatasets julia> mnist = MNIST() julia> x, y = mnist[begin] (features = Float32[0.0 0.0 … 0.0 0.0; 0.0 0.0 … 0.0 0.0; … ; 0.0 0.0 … 0.0 0.0; 0.0 0.0 … 0.0 0.0], targets = 5) ```
- Loading branch information