{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"ds-1000","formal_name":"DS-1000","introduction":"DS-1000 builds 1,000 data-science problems from real StackOverflow questions across seven libraries including NumPy, Pandas and Matplotlib. The problems are perturbed so that recalling the original answer does not solve them.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://ds1000-code-gen.github.io/","indexing_mode":"index","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[],"history":"","construction":"","limitations":"","saturation":"","scores":[]}},"task_id":"c7e94646-93fb-5618-a414-554a0fca24ec","task_key":"default--test--387","task_revision_id":"1","upstream_id":"387","short_description":"I have a 2-d numpy array as follows:","config":"default","split":"test","body":"{\"library\":\"Numpy\",\"prompt\":\"Problem:\\nI have a 2-d numpy array as follows:\\na = np.array([[1,5,9,13],\\n              [2,6,10,14],\\n              [3,7,11,15],\\n              [4,8,12,16]]\\nI want to extract it into patches of 2 by 2 sizes with out repeating the elements.\\nThe answer should exactly be the same. This can be 3-d array or list with the same order of elements as below:\\n[[[1,5],\\n [2,6]],   \\n [[9,13],\\n [10,14]],\\n [[3,7],\\n [4,8]],\\n [[11,15],\\n [12,16]]]\\nHow can do it easily?\\nIn my real problem the size of a is (36, 72). I can not do it one by one. I want programmatic way of doing it.\\nA:\\n<code>\\nimport numpy as np\\na = np.array([[1,5,9,13],\\n              [2,6,10,14],\\n              [3,7,11,15],\\n              [4,8,12,16]])\\n</code>\\nresult = ... # put solution in this variable\\nBEGIN SOLUTION\\n<code>\\n\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://ds1000-code-gen.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}