spyder-kernels icon indicating copy to clipboard operation
spyder-kernels copied to clipboard

Numpy matrix warning in tests

Open juliangilbey opened this issue 3 years ago • 2 comments
trafficstars

Running the tests on Python 3.10 gives the following warnings, among others:

spyder_kernels/console/kernel.py:14
  .../spyder_kernels/console/kernel.py:14: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
    from distutils.version import LooseVersion

spyder_kernels/utils/tests/test_nsview.py::test_get_numpy_type
  .../spyder_kernels/utils/tests/test_nsview.py:430: PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
    matrix = np.matrix([[1, 2], [3, 4]])

The other warnings relate to packages imported by spyder-kernels.

juliangilbey avatar Nov 30 '21 13:11 juliangilbey

Hey @juliangilbey, thanks for reporting. We're aware of this issue but spyder-kernels still supports Python 2 and it's going to stay like that until we release Spyder 6 in six months to a year.

However, we'll take this into account when migrating our code to be Python 3 only.

ccordoba12 avatar Nov 30 '21 15:11 ccordoba12

Thanks @ccordoba12! :-)

juliangilbey avatar Dec 02 '21 08:12 juliangilbey