【发布时间】:2020-11-11 16:45:54
【问题描述】:
我有 2 个 np.array() 如下。当我使用“==”比较两者时,我得到一个输出,但有一个弃用警告。比较具有相同矩阵的 2 个数组时没有警告。
有什么解决方法可以得到相同的结果但没有警告?
非常感谢!
x = np.array([[0,1,2],[3,4,5]])
x
Out: array([[0, 1, 2],
[3, 4, 5]])
y = np.array([[6,7],[8,9],[10,11]])
y
Out: array([[ 6, 7],
[ 8, 9],
[10, 11]])
x == y
Out: False
**C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py:1: DeprecationWarning: elementwise comparison failed; this will raise an error in the future.
"""Entry point for launching an IPython kernel.**
截图:
【问题讨论】:
-
截图在哪里?
标签: python python-3.x pandas numpy data-science