vscode python 中的某些变量的自动补全功能没有突出显示
该变量是返回np.ndarray
i print(type(type(im))
时。
但是,当我尝试访问np.ndarray中的一种方法时,我的VSCODE并没有显示自动完成
,使用dot
喜欢im。im。
。当我尝试np.ndarray()
。 img src =“ https://i.sstatic.net/2v5mp.png” alt =“在此处输入图像说明”>
我的完整代码:
import cv2
import numpy as np
# READ IMAGE
im = cv2.imread('./sampel/fotopendaftaran.jpg',cv2.IMREAD_UNCHANGED) # IMREAD_GRAYSCALE berarti warna abu-abu
im.round()
np.ndarray(shape=(2,2)).round()
# DISPLAY IMAGE
cv2.imshow('Contoh',im)
cv2.waitKey(0)
cv2.destroyAllWindows()
# WRITE IMAGE
cv2.imwrite('./sampel/output.jpg',im)
that variabel is return np.ndarray
when i print(type(im))
.
But my vscode didn't show autocompletion when i'm trying to access one of method in np.ndarray
with start using dot
like im.<method>
. While It work's when I try np.ndarray().<method>
My Full Code:
import cv2
import numpy as np
# READ IMAGE
im = cv2.imread('./sampel/fotopendaftaran.jpg',cv2.IMREAD_UNCHANGED) # IMREAD_GRAYSCALE berarti warna abu-abu
im.round()
np.ndarray(shape=(2,2)).round()
# DISPLAY IMAGE
cv2.imshow('Contoh',im)
cv2.waitKey(0)
cv2.destroyAllWindows()
# WRITE IMAGE
cv2.imwrite('./sampel/output.jpg',im)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论