擅长:python、mysql、java
<pre><code>C= {0: [[[ 8.87155979, 2.50616085]],[[ 0.46289077, 8.05592104]]], 1: [[[-1.3115368 , 7.60922069]]]}
y = [[ 8.87155979, 2.50616085]]
print any(y in x for x in C.values())# checks the subelements of the values in your dict
True
</code></pre>
<p>这将根据你的例子为你的矩阵工作。你知道吗</p>
<pre><code>y=[[ 0.46289077, 8.05592104]]
C = {0: [matrix([[ 8.87155979, 2.50616085]]), matrix([[ 0.46289077, 8.05592104]])],
1: [matrix([[-1.3115368 , 7.60922069]])],
2: [matrix([[ 0.46289077, 8.05592104]]), matrix([[-1.3115368 , 7.60922069]]), matrix([[ 3.4826805 , -0.73544937]])]}
print any((y == x[0]).all() for x in C.values())
True
</code></pre>