Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The shape of the input matrix should be n by n #1

Closed
zengyr49 opened this issue Jul 18, 2019 · 2 comments
Closed

The shape of the input matrix should be n by n #1

zengyr49 opened this issue Jul 18, 2019 · 2 comments

Comments

@zengyr49
Copy link

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.

@jinhongjung
Copy link
Owner

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

jinhongjung added a commit that referenced this issue Mar 2, 2020
@jinhongjung
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants