{"action":"reopened","issue":{"url":"https://api.github.com/repos/rootpy/root_numpy/issues/212","labels_url":"https://api.github.com/repos/rootpy/root_numpy/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/rootpy/root_numpy/issues/212/comments","events_url":"https://api.github.com/repos/rootpy/root_numpy/issues/212/events","html_url":"https://github.com/rootpy/root_numpy/issues/212","id":105056899,"number":212,"title":"Integer-Overflow in tree2array","user":{"login":"thomaskeck","id":6443248,"avatar_url":"https://avatars.githubusercontent.com/u/6443248?v=3","gravatar_id":"","url":"https://api.github.com/users/thomaskeck","html_url":"https://github.com/thomaskeck","followers_url":"https://api.github.com/users/thomaskeck/followers","following_url":"https://api.github.com/users/thomaskeck/following{/other_user}","gists_url":"https://api.github.com/users/thomaskeck/gists{/gist_id}","starred_url":"https://api.github.com/users/thomaskeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomaskeck/subscriptions","organizations_url":"https://api.github.com/users/thomaskeck/orgs","repos_url":"https://api.github.com/users/thomaskeck/repos","events_url":"https://api.github.com/users/thomaskeck/events{/privacy}","received_events_url":"https://api.github.com/users/thomaskeck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-09-05T23:49:41Z","updated_at":"2015-09-09T00:21:25Z","closed_at":null,"body":"TTree::GetEntries() returns an Long64_t\r\n https://root.cern.ch/root/html/TTree.html#TTree:GetEntries,\r\nhowever in tree2array an ordinary int is used to store the number of entries.\r\nhttps://github.com/rootpy/root_numpy/blob/master/root_numpy/src/tree.pyx#L115\r\n\r\nIf I try to load a file with more than 2^31 events (btw. I read the file chunk-wise using start and stop parameter) I get the following error message:\r\n\r\n  File \"/gpfs/home/belle2/tkeck/release/lib/Linux_x86_64/opt/root_pandas.py\", line 36, in _get_pandas_branches\r\n    first_row = root2array(filenames=filename, treename=tree, branches=all_numerical_branches, start=0, stop=1, step=1)[0]\r\n  File \"/gpfs/home/belle2/tkeck/tools/virtualenv/lib/python2.7/site-packages/root_numpy/_tree.py\", line 205, in root2array\r\n    weight_name)\r\n  File \"tree.pyx\", line 354, in _librootnumpy.root2array_fromFname (root_numpy/src/_librootnumpy.cpp:354)\r\n  File \"tree.pyx\", line 297, in _librootnumpy.tree2array (root_numpy/src/_librootnumpy.cpp:297)\r\nValueError: negative dimensions are not allowed\r\n\r\nWhich is probably caused by the resulting integer-overlow.\r\nI suggest to replace all variable types (often just int) with the return-types of the ROOT functions (often long int).\r\n\r\nBest regards,\r\nThomas\r\n\r\nAdditional information:\r\nroot-numpy==4.3.0\r\n"}}