<p dir="auto">Hello everyone,</p>
<p dir="auto">I am having a problem with joblib.load("filename.pkl") returning the error:<br>
ValueError: "Did not recognize loaded array layout"</p>
<p dir="auto">I've looked for information on this error but have found non.  Could someone assist?</p>
<p dir="auto">Further information<br>
I've installed sklearn through pythonxy, on a windows 7 machine, version 15.2 of sklearn.  I've trained a large over a large amount of data, about 30 thousand samples, using the random forest classifier. I dump my classifier using joblib.dump then try to reloaded it using joblib and receive the error message above.</p>
<p dir="auto">I've tried the same code on my mac(this was not through pythonxy) and do not receive an error. I then uninstalled my pythonxy to install the newest version but I receive the same error.</p>
<p dir="auto">Full error:<br>
Traceback (most recent call last):<br>
File "", line 1, in <br>
File "C:\Python27\lib\site-packages\sklearn\externals\joblib\numpy_pickle.py", line 425, in load<br>
obj = unpickler.load()<br>
File "C:\Python27\lib\pickle.py", line 858, in load<br>
dispatch<a href="self">key</a><br>
File "C:\Python27\lib\site-packages\sklearn\externals\joblib\numpy_pickle.py", line 285, in load_build<br>
Unpickler.load_build(self)<br>
File "C:\Python27\lib\pickle.py", line 1217, in load_build<br>
setstate(state)<br>
File "_tree.pyx", line 2280, in sklearn.tree._tree.Tree.<strong>setstate</strong> (sklearn\tree_tree.c:18350)<br>
ValueError: Did not recognise loaded array layout</p>
<p dir="auto">Hello,</p>
<p dir="auto">I want to save a randomForest model to predict a class on new data. I use joblib to save and load data but I get this error when I use joblib.load. ValueError: "Did not recognize loaded array layout"<br>
More information :<br>
platform: Windows-7-6.1.7601-SP1<br>
system: 'Python', '2.7.10 |Anaconda 2.3.0 (32-bit)| (default, May 28 2015, 17:02:00) [MSC v.1500 32 bit (Intel)]'<br>
numpy version 1.9.2<br>
sklearn version 0.16.1<br>
scipy version 0.15.1</p>
<p dir="auto">code reproducing the error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from sklearn.externals import joblib
import numpy as np
from sklearn.ensemble import RandomForestClassifier
X = np.random.randn(1500,8)
l = np.random.randint(6, size = 1500)
clf_forest = RandomForestClassifier(n_estimators = 10)
clf_forest.fit(X,l)
joblib.dump(clf_forest,'clf_forest.pkl')
X_test = joblib.load('clf_forest.pkl')"><pre class="notranslate"><code class="notranslate">from sklearn.externals import joblib
import numpy as np
from sklearn.ensemble import RandomForestClassifier
X = np.random.randn(1500,8)
l = np.random.randint(6, size = 1500)
clf_forest = RandomForestClassifier(n_estimators = 10)
clf_forest.fit(X,l)
joblib.dump(clf_forest,'clf_forest.pkl')
X_test = joblib.load('clf_forest.pkl')
</code></pre></div>
<p dir="auto">Full error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  File &quot;&lt;ipython-input-4-fbcdf8eeb9d7&gt;&quot;, line 1, in &lt;module&gt;
    X_test = joblib.load('clf_forest.pkl')
  File &quot;C:\Users\P\AppData\Local\Continuum\Anaconda\lib\site-packages\sklearn\externals\joblib\numpy_pickle.py&quot;, line 425, in load
    obj = unpickler.load()

  File &quot;C:\Users\P\AppData\Local\Continuum\Anaconda\lib\pickle.py&quot;, line 858, in load
    dispatch[key](self)

  File &quot;C:\Users\P\AppData\Local\Continuum\Anaconda\lib\site-packages\sklearn\externals\joblib\numpy_pickle.py&quot;, line 285, in load_build
    Unpickler.load_build(self)

  File &quot;C:\Users\P\AppData\Local\Continuum\Anaconda\lib\pickle.py&quot;, line 1217, in load_build
    setstate(state)

  File &quot;sklearn/tree/_tree.pyx&quot;, line 3113, in sklearn.tree._tree.Tree.__setstate__ (sklearn\tree\_tree.c:23599)

ValueError: Did not recognise loaded array layout"><pre class="notranslate"><code class="notranslate">  File "&lt;ipython-input-4-fbcdf8eeb9d7&gt;", line 1, in &lt;module&gt;
    X_test = joblib.load('clf_forest.pkl')
  File "C:\Users\P\AppData\Local\Continuum\Anaconda\lib\site-packages\sklearn\externals\joblib\numpy_pickle.py", line 425, in load
    obj = unpickler.load()

  File "C:\Users\P\AppData\Local\Continuum\Anaconda\lib\pickle.py", line 858, in load
    dispatch[key](self)

  File "C:\Users\P\AppData\Local\Continuum\Anaconda\lib\site-packages\sklearn\externals\joblib\numpy_pickle.py", line 285, in load_build
    Unpickler.load_build(self)

  File "C:\Users\P\AppData\Local\Continuum\Anaconda\lib\pickle.py", line 1217, in load_build
    setstate(state)

  File "sklearn/tree/_tree.pyx", line 3113, in sklearn.tree._tree.Tree.__setstate__ (sklearn\tree\_tree.c:23599)

ValueError: Did not recognise loaded array layout
</code></pre></div>
<p dir="auto">Thanks for the help</p>