jinhongjung/pyrwr

The shape of the input matrix should be n by n

Closed this issue · 2 comments

In your code or function : "row_normalize()" as well as other functions, the shape of the function's input matrix should be the same in rows and columns. If the number of rows doesn't match up with that of its columns, we will get error from the function "np.dot()".

If the assumption is that "the matrix.shape[0] == matrix.shape[1]", then why bother to set:
m, n = self.A.shape ? It's really redundant and misleading.

I think that the code can be simplified.

Thanks for the comment! I will refactor the codes in this repo overall after this month and reflect your concern into the update.

I've updated the code as your comment!

Please check the updated file at https://github.com/jinhongjung/pyrwr/blob/master/utils/normalizer.py.

Thank for your comment, and I close this issue.