小编use*_*343的帖子

警告:在 Scipy 1.14.3 中不推荐使用 imresize

我收到以下警告消息:

...\anaconda3\lib\site-packages\ipykernel_launcher.py:1: 
DeprecationWarning: `imresize` is deprecated!
`imresize` is deprecated in SciPy 1.0.0, and will be removed in 1.2.0.
Use ``skimage.transform.resize`` instead.
  """Entry point for launching an IPython kernel.
Run Code Online (Sandbox Code Playgroud)

当我跑

image1 = imresize(image1, (new_size)).astype(np.int16)
image2 = imresize(image2, (new_size)).astype(np.int16)
Run Code Online (Sandbox Code Playgroud)

我不确定我使用的是哪个版本的 Scipy。

这是我正在运行的代码:

from skimage.transform import resize
import numpy as np
import imageio

image1 = imageio.imread("168_Left_Rio_Grande_Flooding_md.jpg")
image2 = imageio.imread("168_Right_Rio_Grande_Flooding_md.jpg")

new_size = np.asarray(image1.shape) / 5
new_size = new_size.astype(int) * 5

image1 = imresize(image1, (new_size)).astype(np.int16)
image2 = imresize(image2, (new_size)).astype(np.int16)
Run Code Online (Sandbox Code Playgroud)

我希望能够计算 image1 和 image2 之间的差异。image1 是土地图像,而 …

python scipy deprecation-warning

2
推荐指数
1
解决办法
4363
查看次数

标签 统计

deprecation-warning ×1

python ×1

scipy ×1