2
votes

I receive a warning that is

"C:\Users\el\Anaconda3\envs\Py3\lib\site-packages\scipy\io\matlab\miobase.py:414: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result.

arr[empties] = ' '".

Although already, I used "sio.savemat" to save the output of codes without any warning, now it gives me a warning. How can I solve it?

Also, scipy = 1.1.0

import scipy.io as sio
sio.savemat(os.path.join("D:\Codes", "num.mat"), {'num': num})
1

1 Answers

4
votes

This warning is being issued by NumPy version 1.15 or higher, and is being generated because of code in scipy version 1.1.0. It will be fixed in Scipy version 1.2.0. Notice the change to miobase.py.

As long as you continue using your current versions of NumPy and SciPy, you have nothing to worry about. In the future, when you upgrade your NumPy (to when the behavior of non-tuple sequence for multidimensional indexing has changed), then be sure to also upgrade your SciPy to at least version 1.2.0.