【发布时间】:2014-11-28 07:19:33
【问题描述】:
我有两个包含每日值和时间步长的 numpy 数组:
A = [[ 0.1 0.05 0.05 0.05 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 .......]]
T = [['19730101' '19730102' '19730103' '19730104' '19730105' '19730106' ....... '19931231']]
并希望将A 拆分为每个月的子数组,例如:
s = numpy.split(A,condition) # condition is when there is a change in month index in T
我不清楚如何跟踪每月数字索引的变化。任何建议将不胜感激。
【问题讨论】:
-
T的值在变化还是在增加???
-
增加一个月(以天为单位),但多年来一直在变化并保持相同的格式
%y4%m2%d2,例如19730101
标签: python arrays python-2.7 numpy