{
  "id": 10601,
  "title": "Reading in data with python",
  "url": "/competitions/seizure-prediction/discussion/10601",
  "author_name": "",
  "post_date": "2014-10-14T22:11:55.987Z",
  "votes": null,
  "comment_count": 2,
  "views": 1142,
  "content": "<p>Hi, I'm attempting to read in the mat files into python using scipy.io.loadmat&nbsp;</p>\n<p>and am running into difficulties:&nbsp;</p>\n<p>&gt;&gt;filePath = pathToData + &quot;/Dog_1/Dog_1_interictal_segment_0001.mat&quot;</p>\n<p>&gt;&gt;result = scipy.io.loadmat(filePath)</p>\n<p>&gt;&gt;a = result['interictal_segment_1']</p>\n<p>&gt;&gt;a.shape</p>\n<p>(1,1)</p>\n<p>&gt;&gt;print a&nbsp;</p>\n<p>array([[ ([[0, 13, 15, 14, 14, 11, 3, 6, 13, 12, 3, -6, -9, -2, -1, 1, 5, 8, 10, 11, 1, 2, 3, 10, 10, 4, 9, 2, -6, -1, 14, 15, 8, 1, -1, -4, -14, -16, -19, -12, 2, 4, 15, 19, 28,</p>\n<p>... large vector</p>\n<p>Has anyone else faced this same issue? &nbsp;</p>\n\n<p>Python 2.7.8</p>\n<p>scipy == 0.14.0</p>\n<p>OS = OS X 10.9.5 Mavericks&nbsp;</p>",
  "messages": [
    {
      "id": "56069",
      "postDate": "10/14/2014 22:11:55",
      "content": "<p>Hi, I'm attempting to read in the mat files into python using scipy.io.loadmat&nbsp;</p>\n<p>and am running into difficulties:&nbsp;</p>\n<p>&gt;&gt;filePath = pathToData + &quot;/Dog_1/Dog_1_interictal_segment_0001.mat&quot;</p>\n<p>&gt;&gt;result = scipy.io.loadmat(filePath)</p>\n<p>&gt;&gt;a = result['interictal_segment_1']</p>\n<p>&gt;&gt;a.shape</p>\n<p>(1,1)</p>\n<p>&gt;&gt;print a&nbsp;</p>\n<p>array([[ ([[0, 13, 15, 14, 14, 11, 3, 6, 13, 12, 3, -6, -9, -2, -1, 1, 5, 8, 10, 11, 1, 2, 3, 10, 10, 4, 9, 2, -6, -1, 14, 15, 8, 1, -1, -4, -14, -16, -19, -12, 2, 4, 15, 19, 28,</p>\n<p>... large vector</p>\n<p>Has anyone else faced this same issue? &nbsp;</p>\n\n<p>Python 2.7.8</p>\n<p>scipy == 0.14.0</p>\n<p>OS = OS X 10.9.5 Mavericks&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "56078",
      "postDate": "10/15/2014 07:50:10",
      "content": "<p>You will find the answer <a href=\"https://www.kaggle.com/c/seizure-prediction/forums/t/10128/fields-in-matlab-file-can-t-find-data-etc\">here</a></p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "56092",
      "postDate": "10/15/2014 19:27:56",
      "content": "<p>Oops didn't look hard enough in the forums.&nbsp;</p>\n<p>Thanks!&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 56078,
      "author_name": "golondrina",
      "author_url": "",
      "post_date": "10/15/2014 07:50:10",
      "content": "<p>You will find the answer <a href=\"https://www.kaggle.com/c/seizure-prediction/forums/t/10128/fields-in-matlab-file-can-t-find-data-etc\">here</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 56092,
      "author_name": "jaygokhale1",
      "author_url": "",
      "post_date": "10/15/2014 19:27:56",
      "content": "<p>Oops didn't look hard enough in the forums.&nbsp;</p>\n<p>Thanks!&nbsp;</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "56069": "",
    "56078": "",
    "56092": ""
  },
  "source": "meta"
}