{"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":"c0f8f623-d7e7-5879-8f9d-e08807b5940a","task_key":"default--test--308","task_revision_id":"1","upstream_id":"308","short_description":"I am waiting for another developer to finish a piece of code that will return an…","config":"default","split":"test","body":"{\"library\":\"Numpy\",\"prompt\":\"Problem:\\nI am waiting for another developer to finish a piece of code that will return an np array of shape (100,2000) with values of either -1,0, or 1.\\nIn the meantime, I want to randomly create an array of the same characteristics so I can get a head start on my development and testing. The thing is that I want this randomly created array to be the same each time, so that I'm not testing against an array that keeps changing its value each time I re-run my process.\\nI can create my array like this, but is there a way to create it so that it's the same each time. I can pickle the object and unpickle it, but wondering if there's another way.\\nr = np.random.randint(3, size=(100, 2000)) - 1\\nSpecifically, I want r_old, r_new to be generated in the same way as r, but their result should be the same.\\nA:\\n<code>\\nimport numpy as np\\n</code>\\nr_old, r_new = ... # put solution in these variables\\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":[]}