Reshape numpy array to contain logical blocks of values from original array | Dark Hacker News