{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/numexpr/issues/185","labels_url":"https://api.github.com/repos/pydata/numexpr/issues/185/labels{/name}","comments_url":"https://api.github.com/repos/pydata/numexpr/issues/185/comments","events_url":"https://api.github.com/repos/pydata/numexpr/issues/185/events","html_url":"https://github.com/pydata/numexpr/issues/185","id":111639516,"number":185,"title":"Regression from 2.4.3 to 2.4.4","user":{"login":"filmor","id":30848,"avatar_url":"https://avatars.githubusercontent.com/u/30848?v=3","gravatar_id":"","url":"https://api.github.com/users/filmor","html_url":"https://github.com/filmor","followers_url":"https://api.github.com/users/filmor/followers","following_url":"https://api.github.com/users/filmor/following{/other_user}","gists_url":"https://api.github.com/users/filmor/gists{/gist_id}","starred_url":"https://api.github.com/users/filmor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filmor/subscriptions","organizations_url":"https://api.github.com/users/filmor/orgs","repos_url":"https://api.github.com/users/filmor/repos","events_url":"https://api.github.com/users/filmor/events{/privacy}","received_events_url":"https://api.github.com/users/filmor/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-15T15:15:00Z","updated_at":"2015-10-24T10:04:38Z","closed_at":"2015-10-24T10:03:12Z","body":"I have the following piece of code:\r\n\r\n    import numexpr as ne\r\n    import numpy as np\r\n\r\n    x1, x2 = [np.random.rand(100000) for i in (0, 0)]\r\n\r\n    prev = None\r\n    for i in range(10000):\r\n        d = ne.evaluate(\"x1 - x2\")\r\n        if prev is None:\r\n            pass\r\n        elif np.any(np.abs(prev - d) > 1e-10):\r\n            print(\"Step\", i, \"Sums:\", np.sum(prev), \"vs.\", np.sum(d))\r\n            break\r\n        prev = d\r\n\r\nI'm essentially taking the difference of two random vectors and finding that after repeating that for some time the difference changes significantly.\r\n\r\nThis code runs fine with numexpr-2.4.3, I'm using Anaconda on Windows AMD64 with the newest version of NumPy (1.10, 1.9 showed the same problem though), and the problem only appears when running multithreaded. Can someone else reproduce this?\r\n\r\nIt seems like a threading issue that leads to parts of the difference array being values very close to zero (~1e-315)."},"comment":{"url":"https://api.github.com/repos/pydata/numexpr/issues/comments/150780348","html_url":"https://github.com/pydata/numexpr/issues/185#issuecomment-150780348","issue_url":"https://api.github.com/repos/pydata/numexpr/issues/185","id":150780348,"user":{"login":"FrancescAlted","id":314521,"avatar_url":"https://avatars.githubusercontent.com/u/314521?v=3","gravatar_id":"","url":"https://api.github.com/users/FrancescAlted","html_url":"https://github.com/FrancescAlted","followers_url":"https://api.github.com/users/FrancescAlted/followers","following_url":"https://api.github.com/users/FrancescAlted/following{/other_user}","gists_url":"https://api.github.com/users/FrancescAlted/gists{/gist_id}","starred_url":"https://api.github.com/users/FrancescAlted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrancescAlted/subscriptions","organizations_url":"https://api.github.com/users/FrancescAlted/orgs","repos_url":"https://api.github.com/users/FrancescAlted/repos","events_url":"https://api.github.com/users/FrancescAlted/events{/privacy}","received_events_url":"https://api.github.com/users/FrancescAlted/received_events","type":"User","site_admin":false},"created_at":"2015-10-24T10:04:38Z","updated_at":"2015-10-24T10:04:38Z","body":"I reverted the 'harmless data race'.  If @legrosbuffle has comments they are still welcome."}}