PRF: Optimize 2d take operations.