Simple question: How do I save a NumPy array into a file that Matlab can easily read? I have found the scipy.io.savemat method but without any examples, I am having trouble figuring out how to use it. For instance, if I try this:
import numpy as np
import scipy.io as sio
theArray = np.array([0,1,2])
sio.savemat('theArray.mat', theArray)
Line 4 gives the error message "AttributeError: 'numpy.ndarray' object has no attribute 'items'". How do I fix this.