{
  "id": 54684,
  "title": "Index was outside the bounds of the array.",
  "url": "/competitions/data-science-bowl-2018/discussion/54684",
  "author_name": "",
  "post_date": "2018-04-16T19:22:44.468449300Z",
  "votes": 1,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Does anyone have idea of some of the reasons that may caused this error? I already checked for blank rows between rows with text. I'm running out of ideas.</p>",
  "messages": [
    {
      "id": "315137",
      "postDate": "04/16/2018 19:22:44",
      "content": "<p>Does anyone have idea of some of the reasons that may caused this error? I already checked for blank rows between rows with text. I'm running out of ideas.</p>",
      "rawMarkdown": "Does anyone have idea of some of the reasons that may caused this error? I already checked for blank rows between rows with text. I'm running out of ideas.",
      "votes": null
    },
    {
      "id": "315150",
      "postDate": "04/16/2018 19:38:16",
      "content": "<p>This most commonly happens when you are iterating over an array and the upper bound is outside the range. For example, if you've set the upper bound to say equal to 100 in the loop and the actual size of the array is only 99 elements then you'll get this error. You've to debug it yourself I guess.</p>",
      "rawMarkdown": "This most commonly happens when you are iterating over an array and the upper bound is outside the range. For example, if you've set the upper bound to say equal to 100 in the loop and the actual size of the array is only 99 elements then you'll get this error. You've to debug it yourself I guess.",
      "votes": null
    },
    {
      "id": "315152",
      "postDate": "04/16/2018 19:38:55",
      "content": "<p>can you try this in your function where you load images. </p>\n\n<p>if len(image.shape) == 2:\n    image = skimage.color.gray2rgb(image)\nif len(image.shape)&gt;2:\n    if image.shape[2] != 3:\n        image = image[:,:,:3]</p>",
      "rawMarkdown": "can you try this in your function where you load images. \n\nif len(image.shape) == 2:\n    image = skimage.color.gray2rgb(image)\nif len(image.shape)&gt;2:\n    if image.shape[2] != 3:\n        image = image[:,:,:3]",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 315150,
      "author_name": "kishupro",
      "author_url": "",
      "post_date": "04/16/2018 19:38:16",
      "content": "<p>This most commonly happens when you are iterating over an array and the upper bound is outside the range. For example, if you've set the upper bound to say equal to 100 in the loop and the actual size of the array is only 99 elements then you'll get this error. You've to debug it yourself I guess.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 315152,
      "author_name": "mpsampat",
      "author_url": "",
      "post_date": "04/16/2018 19:38:55",
      "content": "<p>can you try this in your function where you load images. </p>\n\n<p>if len(image.shape) == 2:\n    image = skimage.color.gray2rgb(image)\nif len(image.shape)&gt;2:\n    if image.shape[2] != 3:\n        image = image[:,:,:3]</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "315137": "Does anyone have idea of some of the reasons that may caused this error? I already checked for blank rows between rows with text. I'm running out of ideas.",
    "315150": "This most commonly happens when you are iterating over an array and the upper bound is outside the range. For example, if you've set the upper bound to say equal to 100 in the loop and the actual size of the array is only 99 elements then you'll get this error. You've to debug it yourself I guess.",
    "315152": "can you try this in your function where you load images. \n\nif len(image.shape) == 2:\n    image = skimage.color.gray2rgb(image)\nif len(image.shape)&gt;2:\n    if image.shape[2] != 3:\n        image = image[:,:,:3]"
  },
  "source": "meta"
}