From 0d73b3a7e821517687aa67bea237a238df888c82 Mon Sep 17 00:00:00 2001 From: Sid-Bhatia-0 Date: Sun, 1 Nov 2020 00:06:17 +0530 Subject: [PATCH] fix minor typos --- src/components/approximators/tabular_approximator.jl | 2 +- src/utils/base.jl | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/approximators/tabular_approximator.jl b/src/components/approximators/tabular_approximator.jl index efbcfa4..3648e36 100644 --- a/src/components/approximators/tabular_approximator.jl +++ b/src/components/approximators/tabular_approximator.jl @@ -13,7 +13,7 @@ struct TabularApproximator{N,T<:AbstractArray} <: AbstractApproximator table::T function TabularApproximator(table::T) where {T<:AbstractArray} n = ndims(table) - n <= 2 || throw(ArgumentError("the dimention of table must be <= 2")) + n <= 2 || throw(ArgumentError("the dimension of table must be <= 2")) new{n,T}(table) end end diff --git a/src/utils/base.jl b/src/utils/base.jl index 5ffebe6..b5e18ac 100644 --- a/src/utils/base.jl +++ b/src/utils/base.jl @@ -73,18 +73,18 @@ consecutive_view(cb::AbstractArray, inds::Vector{Int}, n_stack::Int, ::Nothing) cb, reshape([i for x in inds for i in x-n_stack+1:x], n_stack, length(inds)), ) -consecutive_view(cb::AbstractArray, inds::Vector{Int}, ::Nothing, n_horizeon::Int) = +consecutive_view(cb::AbstractArray, inds::Vector{Int}, ::Nothing, n_horizon::Int) = select_last_dim( cb, - reshape([i for x in inds for i in x:x+n_horizeon-1], n_horizeon, length(inds)), + reshape([i for x in inds for i in x:x+n_horizon-1], n_horizon, length(inds)), ) -consecutive_view(cb::AbstractArray, inds::Vector{Int}, n_stack::Int, n_horizeon::Int) = +consecutive_view(cb::AbstractArray, inds::Vector{Int}, n_stack::Int, n_horizon::Int) = select_last_dim( cb, reshape( - [j for x in inds for i in x:x+n_horizeon-1 for j in i-n_stack+1:i], + [j for x in inds for i in x:x+n_horizon-1 for j in i-n_stack+1:i], n_stack, - n_horizeon, + n_horizon, length(inds), ), )