I am struggling to figure out the following error. I understand the error is coming from incompatible dimensions of the vec and planes argument, but I don’t understand how to use planes with (20,8) when vec has a 300 dimension.
ValueError Traceback (most recent call last)
<ipython-input-48-cd00c4542d1b> in <module>
1 # Test your function
----> 2 w4_unittest.test_hash_value_of_vector(hash_value_of_vector)
~/work/w4_unittest.py in test_hash_value_of_vector(target)
4450
4451 for test_case in test_cases:
-> 4452 result = target(**test_case["input"])
4453
4454 try:
<ipython-input-46-5054df5fbddd> in hash_value_of_vector(v, planes)
16 print(vec.shape)
17 print(planes.shape)
---> 18 dot_product = np.dot(vec, planes)
19
20 # get the sign of the dot product (1,10) shaped vector
<__array_function__ internals> in dot(*args, **kwargs)
ValueError: shapes (1,300) and (20,8) not aligned: 300 (dim 1) != 20 (dim 0)