Removing deprecated warnings from python

I am new to python and am currently working on an image processing project in which I need to compare two images. For comparing images, I am using the structural similarity function that already exists in python. But every time I use this function, it gives me correct results, but also gives me a warning multiple times, like this:

C:\Users\abc\Anaconda\lib\site-packages\skimage\measure\_structural_similarity.py:224: skimage_deprecation: Call to deprecated function ``structural_similarity``. Use ``compare_ssim`` instead.
  def structural_similarity(X, Y, win_size=None, gradient=False,

      

I thought the warning wanted me to use the compare_ssim function instead of the struct_similarity function. So, I changed this: from skimage.measure import compare_ssim as ssim

But the same warnings. I am using this feature for multiple images in one run, so I have to scroll a lot to figure out exactly where my results are among the warnings.

I need to disable these deprecated warnings to keep my console clean. Any solution for this? I tried to search, but everything was too difficult for me. Please, help.

ALSO It might be possible to duplicate this question, but I can't figure out how to implement the accepted answer on Spyder using the IPython console in windows.

+3


source to share





All Articles