{"task": {"agent_timeout": 1800, "task": "508", "verifier_timeout": 1800, "instruction": "# 508: DS-1000 Task\n\n## Prompt\nProblem: \nHere is a rather difficult problem.\nI am dealing with arrays created via numpy.array(), and I need to draw points on a canvas simulating an image. Since there is a lot of zero values around the central part of the array which contains the meaningful data, I would like to \"truncate\" the array, erasing entire columns that only contain zeros and rows that only contain zeros.\nSo, I would like to know if there is some native numpy function or code snippet to \"truncate\" or find a \"bounding box\" to slice only the part containing nonzero data of the array.\n(since it is a conceptual question, I did not put any code, sorry if I should, I'm very fresh to posting at SO.)\nTIA!\n\nA:\n<code>\nimport numpy as np\nA = np.array([[0, 0, 0, 0, 0, 0, 0],\n           [0, 0, 0, 0, 0, 0, 0],\n           [0, 0, 1, 0, 0, 0, 0],\n           [0, 0, 1, 1, 0, 0, 0],\n           [0, 0, 0, 0, 1, 0, 0],\n           [0, 0, 0, 0, 0, 0, 0],\n           [0, 0, 0, 0, 0, 0, 0]])\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": []}