vscode python 中的某些变量的自动补全功能没有突出显示

发布于 2025-01-18 17:34:45 字数 820 浏览 0 评论 0原文

该变量是返回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>

enter image description here
enter image description here

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文