{"action":"created","comment":{"url":"https://api.github.com/repos/nest/nest-simulator/pulls/comments/73149401","id":73149401,"diff_hunk":"@@ -106,21 +101,54 @@ def from_file(fname, **kwargs):\n \n     Parameters\n     ----------\n-    fname : str\n-        Name of file\n+    fname : str or tuple(str) or list(str)\n+        File name or list of file names\n     kwargs:\n         Parameters passed to _make_plot\n     \"\"\"\n-\n-    if nest.is_iterable(fname):\n-        data = None\n-        for f in fname:\n-            if data is None:\n-                data = numpy.loadtxt(f)\n-            else:\n-                data = numpy.concatenate((data, numpy.loadtxt(f)))\n+    if isinstance(fname, str):\n+        fname = [fname]\n+\n+    if isinstance(fname, (list, tuple)):\n+        try:\n+            global pandas\n+            pandas = __import__('pandas')\n+            from_file_pandas(fname, **kwargs)\n+        except ImportError:\n+            from_file_numpy(fname, **kwargs)\n     else:\n-        data = numpy.loadtxt(fname)\n+        print >> sys.stderr, 'fname should be of str/list(str)/tuple(str).'\n+        return None","path":"pynest/nest/raster_plot.py","position":69,"original_position":69,"commit_id":"4d5957c55a626df833b4bf73029bdc10c5e08660","original_commit_id":"4d5957c55a626df833b4bf73029bdc10c5e08660","user":{"login":"heplesser","id":1059644,"avatar_url":"https://avatars.githubusercontent.com/u/1059644?v=3","gravatar_id":"","url":"https://api.github.com/users/heplesser","html_url":"https://github.com/heplesser","followers_url":"https://api.github.com/users/heplesser/followers","following_url":"https://api.github.com/users/heplesser/following{/other_user}","gists_url":"https://api.github.com/users/heplesser/gists{/gist_id}","starred_url":"https://api.github.com/users/heplesser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heplesser/subscriptions","organizations_url":"https://api.github.com/users/heplesser/orgs","repos_url":"https://api.github.com/users/heplesser/repos","events_url":"https://api.github.com/users/heplesser/events{/privacy}","received_events_url":"https://api.github.com/users/heplesser/received_events","type":"User","site_admin":false},"body":"This return as superfluous, I think.","created_at":"2016-08-02T12:58:59Z","updated_at":"2016-08-02T12:58:59Z","html_url":"https://github.com/nest/nest-simulator/pull/422#discussion_r73149401","pull_request_url":"https://api.github.com/repos/nest/nest-simulator/pulls/422","_links":{"self":{"href":"https://api.github.com/repos/nest/nest-simulator/pulls/comments/73149401"},"html":{"href":"https://github.com/nest/nest-simulator/pull/422#discussion_r73149401"},"pull_request":{"href":"https://api.github.com/repos/nest/nest-simulator/pulls/422"}}},"pull_request":{"url":"https://api.github.com/repos/nest/nest-simulator/pulls/422","id":77618702,"html_url":"https://github.com/nest/nest-simulator/pull/422","diff_url":"https://github.com/nest/nest-simulator/pull/422.diff","patch_url":"https://github.com/nest/nest-simulator/pull/422.patch","issue_url":"https://api.github.com/repos/nest/nest-simulator/issues/422","number":422,"state":"open","locked":false,"title":"Use pandas if available","user":{"login":"sanjayankur31","id":102575,"avatar_url":"https://avatars.githubusercontent.com/u/102575?v=3","gravatar_id":"","url":"https://api.github.com/users/sanjayankur31","html_url":"https://github.com/sanjayankur31","followers_url":"https://api.github.com/users/sanjayankur31/followers","following_url":"https://api.github.com/users/sanjayankur31/following{/other_user}","gists_url":"https://api.github.com/users/sanjayankur31/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjayankur31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjayankur31/subscriptions","organizations_url":"https://api.github.com/users/sanjayankur31/orgs","repos_url":"https://api.github.com/users/sanjayankur31/repos","events_url":"https://api.github.com/users/sanjayankur31/events{/privacy}","received_events_url":"https://api.github.com/users/sanjayankur31/received_events","type":"User","site_admin":false},"body":"It tries to load the pandas module and uses it if it can, otherwise, it\r\nfalls back to numpy.\r\n\r\nNote that the nest.is_iterable test returns True for a string, since a\r\nstring is iterable and the function then tries to iterate over each\r\ncharacter in the string! I've, therefore, changed the test.\r\n\r\nTested this out with the gdf file generated from\r\n`examples/nest/tsodyks_shortterm_bursts.sli` using the\r\n`examples/nest/plot_tsodyks_shortterm_bursts.py` plotter script and it\r\nworks both with and without pandas.\r\n\r\nFixes #400 to begin with.","created_at":"2016-07-15T13:51:25Z","updated_at":"2016-08-02T12:59:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a0666b2c059c3a895f672d4611af3ceb13fbe4af","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nest/nest-simulator/pulls/422/commits","review_comments_url":"https://api.github.com/repos/nest/nest-simulator/pulls/422/comments","review_comment_url":"https://api.github.com/repos/nest/nest-simulator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nest/nest-simulator/issues/422/comments","statuses_url":"https://api.github.com/repos/nest/nest-simulator/statuses/4d5957c55a626df833b4bf73029bdc10c5e08660","head":{"label":"sanjayankur31:use-pandas","ref":"use-pandas","sha":"4d5957c55a626df833b4bf73029bdc10c5e08660","user":{"login":"sanjayankur31","id":102575,"avatar_url":"https://avatars.githubusercontent.com/u/102575?v=3","gravatar_id":"","url":"https://api.github.com/users/sanjayankur31","html_url":"https://github.com/sanjayankur31","followers_url":"https://api.github.com/users/sanjayankur31/followers","following_url":"https://api.github.com/users/sanjayankur31/following{/other_user}","gists_url":"https://api.github.com/users/sanjayankur31/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjayankur31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjayankur31/subscriptions","organizations_url":"https://api.github.com/users/sanjayankur31/orgs","repos_url":"https://api.github.com/users/sanjayankur31/repos","events_url":"https://api.github.com/users/sanjayankur31/events{/privacy}","received_events_url":"https://api.github.com/users/sanjayankur31/received_events","type":"User","site_admin":false},"repo":{"id":37984460,"name":"nest-simulator","full_name":"sanjayankur31/nest-simulator","owner":{"login":"sanjayankur31","id":102575,"avatar_url":"https://avatars.githubusercontent.com/u/102575?v=3","gravatar_id":"","url":"https://api.github.com/users/sanjayankur31","html_url":"https://github.com/sanjayankur31","followers_url":"https://api.github.com/users/sanjayankur31/followers","following_url":"https://api.github.com/users/sanjayankur31/following{/other_user}","gists_url":"https://api.github.com/users/sanjayankur31/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjayankur31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjayankur31/subscriptions","organizations_url":"https://api.github.com/users/sanjayankur31/orgs","repos_url":"https://api.github.com/users/sanjayankur31/repos","events_url":"https://api.github.com/users/sanjayankur31/events{/privacy}","received_events_url":"https://api.github.com/users/sanjayankur31/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sanjayankur31/nest-simulator","description":"The NEST simulator","fork":true,"url":"https://api.github.com/repos/sanjayankur31/nest-simulator","forks_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/forks","keys_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/teams","hooks_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/hooks","issue_events_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/issues/events{/number}","events_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/events","assignees_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/assignees{/user}","branches_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/branches{/branch}","tags_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/tags","blobs_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/git/refs{/sha}","trees_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/statuses/{sha}","languages_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/languages","stargazers_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/stargazers","contributors_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/contributors","subscribers_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/subscribers","subscription_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/subscription","commits_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/commits{/sha}","git_commits_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/git/commits{/sha}","comments_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/comments{/number}","issue_comment_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/issues/comments{/number}","contents_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/contents/{+path}","compare_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/merges","archive_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/downloads","issues_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/issues{/number}","pulls_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/pulls{/number}","milestones_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/milestones{/number}","notifications_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/labels{/name}","releases_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/releases{/id}","deployments_url":"https://api.github.com/repos/sanjayankur31/nest-simulator/deployments","created_at":"2015-06-24T13:00:02Z","updated_at":"2016-02-01T13:56:17Z","pushed_at":"2016-07-26T16:24:32Z","git_url":"git://github.com/sanjayankur31/nest-simulator.git","ssh_url":"git@github.com:sanjayankur31/nest-simulator.git","clone_url":"https://github.com/sanjayankur31/nest-simulator.git","svn_url":"https://github.com/sanjayankur31/nest-simulator","homepage":null,"size":17389,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nest:master","ref":"master","sha":"cd634a327334987dd137575869d11df3e21b37ff","user":{"login":"nest","id":2377019,"avatar_url":"https://avatars.githubusercontent.com/u/2377019?v=3","gravatar_id":"","url":"https://api.github.com/users/nest","html_url":"https://github.com/nest","followers_url":"https://api.github.com/users/nest/followers","following_url":"https://api.github.com/users/nest/following{/other_user}","gists_url":"https://api.github.com/users/nest/gists{/gist_id}","starred_url":"https://api.github.com/users/nest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nest/subscriptions","organizations_url":"https://api.github.com/users/nest/orgs","repos_url":"https://api.github.com/users/nest/repos","events_url":"https://api.github.com/users/nest/events{/privacy}","received_events_url":"https://api.github.com/users/nest/received_events","type":"Organization","site_admin":false},"repo":{"id":33933892,"name":"nest-simulator","full_name":"nest/nest-simulator","owner":{"login":"nest","id":2377019,"avatar_url":"https://avatars.githubusercontent.com/u/2377019?v=3","gravatar_id":"","url":"https://api.github.com/users/nest","html_url":"https://github.com/nest","followers_url":"https://api.github.com/users/nest/followers","following_url":"https://api.github.com/users/nest/following{/other_user}","gists_url":"https://api.github.com/users/nest/gists{/gist_id}","starred_url":"https://api.github.com/users/nest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nest/subscriptions","organizations_url":"https://api.github.com/users/nest/orgs","repos_url":"https://api.github.com/users/nest/repos","events_url":"https://api.github.com/users/nest/events{/privacy}","received_events_url":"https://api.github.com/users/nest/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nest/nest-simulator","description":"The NEST simulator","fork":false,"url":"https://api.github.com/repos/nest/nest-simulator","forks_url":"https://api.github.com/repos/nest/nest-simulator/forks","keys_url":"https://api.github.com/repos/nest/nest-simulator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nest/nest-simulator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nest/nest-simulator/teams","hooks_url":"https://api.github.com/repos/nest/nest-simulator/hooks","issue_events_url":"https://api.github.com/repos/nest/nest-simulator/issues/events{/number}","events_url":"https://api.github.com/repos/nest/nest-simulator/events","assignees_url":"https://api.github.com/repos/nest/nest-simulator/assignees{/user}","branches_url":"https://api.github.com/repos/nest/nest-simulator/branches{/branch}","tags_url":"https://api.github.com/repos/nest/nest-simulator/tags","blobs_url":"https://api.github.com/repos/nest/nest-simulator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nest/nest-simulator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nest/nest-simulator/git/refs{/sha}","trees_url":"https://api.github.com/repos/nest/nest-simulator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nest/nest-simulator/statuses/{sha}","languages_url":"https://api.github.com/repos/nest/nest-simulator/languages","stargazers_url":"https://api.github.com/repos/nest/nest-simulator/stargazers","contributors_url":"https://api.github.com/repos/nest/nest-simulator/contributors","subscribers_url":"https://api.github.com/repos/nest/nest-simulator/subscribers","subscription_url":"https://api.github.com/repos/nest/nest-simulator/subscription","commits_url":"https://api.github.com/repos/nest/nest-simulator/commits{/sha}","git_commits_url":"https://api.github.com/repos/nest/nest-simulator/git/commits{/sha}","comments_url":"https://api.github.com/repos/nest/nest-simulator/comments{/number}","issue_comment_url":"https://api.github.com/repos/nest/nest-simulator/issues/comments{/number}","contents_url":"https://api.github.com/repos/nest/nest-simulator/contents/{+path}","compare_url":"https://api.github.com/repos/nest/nest-simulator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nest/nest-simulator/merges","archive_url":"https://api.github.com/repos/nest/nest-simulator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nest/nest-simulator/downloads","issues_url":"https://api.github.com/repos/nest/nest-simulator/issues{/number}","pulls_url":"https://api.github.com/repos/nest/nest-simulator/pulls{/number}","milestones_url":"https://api.github.com/repos/nest/nest-simulator/milestones{/number}","notifications_url":"https://api.github.com/repos/nest/nest-simulator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nest/nest-simulator/labels{/name}","releases_url":"https://api.github.com/repos/nest/nest-simulator/releases{/id}","deployments_url":"https://api.github.com/repos/nest/nest-simulator/deployments","created_at":"2015-04-14T13:39:12Z","updated_at":"2016-07-29T23:24:18Z","pushed_at":"2016-08-02T12:36:21Z","git_url":"git://github.com/nest/nest-simulator.git","ssh_url":"git@github.com:nest/nest-simulator.git","clone_url":"https://github.com/nest/nest-simulator.git","svn_url":"https://github.com/nest/nest-simulator","homepage":null,"size":29121,"stargazers_count":83,"watchers_count":83,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":82,"mirror_url":null,"open_issues_count":141,"forks":82,"open_issues":141,"watchers":83,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nest/nest-simulator/pulls/422"},"html":{"href":"https://github.com/nest/nest-simulator/pull/422"},"issue":{"href":"https://api.github.com/repos/nest/nest-simulator/issues/422"},"comments":{"href":"https://api.github.com/repos/nest/nest-simulator/issues/422/comments"},"review_comments":{"href":"https://api.github.com/repos/nest/nest-simulator/pulls/422/comments"},"review_comment":{"href":"https://api.github.com/repos/nest/nest-simulator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nest/nest-simulator/pulls/422/commits"},"statuses":{"href":"https://api.github.com/repos/nest/nest-simulator/statuses/4d5957c55a626df833b4bf73029bdc10c5e08660"}}}}
{"actor":{"display_login":"heplesser"}}