diff --git a/src/examples.jl b/src/examples.jl index acb6688e..8e05dec6 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -444,7 +444,7 @@ see: http://stackoverflow.com/a/37732384/5075246 N = 10 D = length(tickers) weights = rand(N,D) - weights ./= sum(weights, 2) + weights ./= sum(weights, dims = 2) returns = sort!((1:N) + D*randn(N)) portfoliocomposition(weights, returns, labels = permutedims(tickers)) diff --git a/src/recipes.jl b/src/recipes.jl index 4b513a4b..5ae3cebf 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -1143,7 +1143,7 @@ end @recipe function f(pc::PortfolioComposition) weights, returns = pc.args n = length(returns) - weights = cumsum(weights,2) + weights = cumsum(weights, dims = 2) seriestype := :shape # create a filled polygon for each item