{"task": {"agent_timeout": 1800, "task": "319", "verifier_timeout": 1800, "instruction": "# 319: DS-1000 Task\n\n## Prompt\nProblem:\nIs there a way to change the order of the matrices in a numpy 3D array to a new and arbitrary order? For example, I have an array `a`:\narray([[[10, 20],\n        [30, 40]],\n       [[6,  7],\n        [8,  9]],\n\t[[10, 11],\n\t [12, 13]]])\nand I want to change it into, say\narray([[[6,  7],\n        [8,  9]],\n\t[[10, 20],\n        [30, 40]],\n\t[[10, 11],\n\t [12, 13]]])\nby applying the permutation\n0 -> 1\n1 -> 0\n2 -> 2\non the matrices. In the new array, I therefore want to move the first matrix of the original to the second, and the second to move to the first place and so on.\nIs there a numpy function to do it? \nThank you.\nA:\n<code>\nimport numpy as np\na = np.array([[[10, 20],\n        [30, 40]],\n       [[6,  7],\n        [8,  9]],\n\t[[10, 11],\n\t [12, 13]]])\npermutation = [1, 0, 2]\n</code>\nresult = ... # put solution in this variable\nBEGIN SOLUTION\n<code>\n\n## What to do\n- Edit `solution/solution.py` so the code passes the DS-1000 tests.\n- Do not access the internet or install new packages; required libraries are preinstalled in the Docker image.\n- Run tests locally via `bash tests/test.sh`.\n\n## Notes\n- Keep the variable names/signatures implied by the prompt/code_context.\n- The evaluator uses the original DS-1000 `code_context` (`test_execution` / `test_string`).\n", "memory": "", "runnable": false, "difficulty": "", "language": "", "cpus": "", "instruction_truncated": false, "category": "", "compose": false, "has_solution": true, "oracle": null, "docker_image": "ds1000:latest", "taskset": "ds1000", "tags": []}, "runs": []}