-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Closed
Labels
BuildLibrary building on various platformsLibrary building on various platforms
Description
This issue has been reported in the past, however there were some problems reproducing it. (#6720). I'm providing some code that hopefully helps catch the bug (finally!).
The error appears to be related to the division of a large Series or DataFrame that was built by pd.read_hdf(). To see this, please run the following sample code:
import pandas as pd,numpy as np
# Works
df=pd.DataFrame(np.arange(10000).reshape(-1,4),columns=['a','b','c','d'])
df.to_hdf('hdf5.h5','test')
df=pd.read_hdf('hdf5.h5','test')
x=(df['a']-df['b'])/(df['c']-df['d'])
print 'Done for 10000'
# Does not work
df=pd.DataFrame(np.arange(100000).reshape(-1,4),columns=['a','b','c','d'])
df.to_hdf('hdf5.h5','test')
df=pd.read_hdf('hdf5.h5','test')
x=(df['a']-df['b'])/(df['c']-df['d'])
print 'Done for 100000'The first operation is carried out, however the second one produces this error when the division is attempted.
OMP: Error #134: Cannot set thread affinity mask.
OMP: System error #87: The parameter is incorrect.The issue can be avoided by:
- operating with Numpy arrays, e.g.
x=(df['a']-df['b']).values/(df['c']-df['d']).values - or by setting
pd.computation.expressions.set_use_numexpr(False)
- or by creating the DataFrame from pd.read_csv().
I'm running Pandas 0.15.2-1, Numpy 1.8.1-2. Enthought's Canopy 1.5.0.2717.
Thanks
Metadata
Metadata
Assignees
Labels
BuildLibrary building on various platformsLibrary building on various platforms