{
  "id": 242370,
  "title": "Low speed of np.vstack",
  "url": "/competitions/birdclef-2021/discussion/242370",
  "author_name": "",
  "post_date": "2021-05-28T15:47:13.062196600Z",
  "votes": 1,
  "comment_count": 2,
  "views": 0,
  "content": "<p>To feed the neural network model, I need to merge 5-seconds data(about 30000) into a big array. But I found that the speed of np.vstack() is decreasing overtime. It could hardly work after 10 minutes. Is there any other way to solve the problem? THX.</p>",
  "messages": [
    {
      "id": "1326668",
      "postDate": "05/28/2021 15:47:13",
      "content": "<p>To feed the neural network model, I need to merge 5-seconds data(about 30000) into a big array. But I found that the speed of np.vstack() is decreasing overtime. It could hardly work after 10 minutes. Is there any other way to solve the problem? THX.</p>",
      "rawMarkdown": "To feed the neural network model, I need to merge 5-seconds data(about 30000) into a big array. But I found that the speed of np.vstack() is decreasing overtime. It could hardly work after 10 minutes. Is there any other way to solve the problem? THX.",
      "votes": null
    },
    {
      "id": "1326703",
      "postDate": "05/28/2021 16:08:11",
      "content": "<p>Preallocate your array and then copy your data into it. Or put all your data into one big python list and call np.array on it, that might work too.</p>",
      "rawMarkdown": "Preallocate your array and then copy your data into it. Or put all your data into one big python list and call np.array on it, that might work too.",
      "votes": null
    },
    {
      "id": "1327158",
      "postDate": "05/29/2021 02:22:05",
      "content": "<p>Thx，I'll try</p>",
      "rawMarkdown": "Thx，I'll try",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1326703,
      "author_name": "fffrrt",
      "author_url": "",
      "post_date": "05/28/2021 16:08:11",
      "content": "<p>Preallocate your array and then copy your data into it. Or put all your data into one big python list and call np.array on it, that might work too.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1327158,
          "author_name": "carlos0902",
          "author_url": "",
          "post_date": "05/29/2021 02:22:05",
          "content": "<p>Thx，I'll try</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1326668": "To feed the neural network model, I need to merge 5-seconds data(about 30000) into a big array. But I found that the speed of np.vstack() is decreasing overtime. It could hardly work after 10 minutes. Is there any other way to solve the problem? THX.",
    "1326703": "Preallocate your array and then copy your data into it. Or put all your data into one big python list and call np.array on it, that might work too.",
    "1327158": "Thx，I'll try"
  },
  "source": "meta"
}