Writing Python numpy arrays to .mat file
<p>I have a series of numpy arrays that I want to save in a .mat file so that I can plot the data later. (I don't want to use Pickle because my actual program is much more complicated and has more than 2 arrays.) My MWE is:</p>

<pre><code>import numpy as np
import mat4py as m4p

x = np.array([1,20,0.4,0.5,9,8.8])
y = np.array([0.3,0.6,1,1,0.01,0.7])

data = {'x': x,
        'y': y}
m4p.savemat('datafile.mat', data)
</code></pre>

<p>but I get an error <code>ValueError: Only dicts, two dimensional numeric, and char arrays are currently supported</code>.</p>

<p>What does this mean and how can I fix this?</p>