预测销售额
为了规划明年的运营,您希望根据销售预测进行安排,并且已经收集了针对每个月和各个行业的乘数。这些乘数保存在名为 monthly_industry_multipliers 的数组中。例如,monthly_industry_multipliers[0, 0] 的 0.98 表示:预计明年 1 月酒类商店行业的销售额将达到今年 1 月的 98%。
array([[0.98, 1.02, 1. ],
[1.00, 1.01, 0.97],
[1.06, 1.03, 0.98],
[1.08, 1.01, 0.98],
[1.08, 0.98, 0.98],
[1.1 , 0.99, 0.99],
[1.12, 1.01, 1. ],
[1.1 , 1.02, 1. ],
[1.11, 1.01, 1.01],
[1.08, 0.99, 0.97],
[1.09, 1. , 1.02],
[1.13, 1.03, 1.02]])
numpy 已作为 np 为您加载,monthly_sales 和 monthly_industry_multipliers 数组已可用。monthly_sales 的列顺序分别对应酒类商店、餐馆和百货商店的销售额。
本练习是课程的一部分
NumPy 入门
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Create an array of monthly projected sales for all industries
projected_monthly_sales = ____
print(projected_monthly_sales)