You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for the normalization algorithm. I found an issue about the element-wise product(**2, iced/iced/normalization/init.py line 101).
If the input of X is the type of matrix, the expression "**2" will make a production of matrices.
If the input of X is the type of ndarray the expression "**2" will make element-wise production.
I think the "**2" in the algorithm is supposed to be element-wise production. So, it might be the explicit expression of element-wise production or check the type of X.
Reproduction:
A = np.matrix(np.ones((2,2)))
print(A**2)
[[2. 2.]
[2. 2.]]
A = np.asarray(np.ones((2,2)))
print(A**2)"
[[1. 1.]
[1. 1.]]
Thanks.
The text was updated successfully, but these errors were encountered:
Hello,
I will add a check for matrices but a general rule of thumb with numpy is that you should never use the np.matrix format. Most libraries will not work with matrices as it is not a flexible format and has introduced over the year a number of incoherent operations (np.dot and * are switched between arrays and matrices).
Cheers,
N
Hi, thanks for the normalization algorithm. I found an issue about the element-wise product(**2, iced/iced/normalization/init.py line 101).
If the input of X is the type of matrix, the expression "**2" will make a production of matrices.
If the input of X is the type of ndarray the expression "**2" will make element-wise production.
I think the "**2" in the algorithm is supposed to be element-wise production. So, it might be the explicit expression of element-wise production or check the type of X.
Reproduction:
Thanks.
The text was updated successfully, but these errors were encountered: