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

Correct documentation #352

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

JasonSteelmanCoder
Copy link

Setting transformation to "U" causes an "unsupported weights transformation" exception because "U" is not an accepted parameter of the set_transform method of the libpysal.weights.W class. The correct argument is "O", which is described in the libpysal.weights.W documentation as "Restore original transformation (from instantiation)". I've updated the documentation to reflect that.

Setting transformation to "U" causes an "unsupported weights transformation" exception because "U" is not an accepted parameter of the set_transform method of the libpysal.weights.W class. The correct argument is "O", which is described in the libpysal.weights.W documentation as "Restore original transformation (from instantiation)". I've updated the documentation to reflect that.
Copy link
Member

@martinfleis martinfleis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is indeed a correct formulation when libpysal.weights.W object is passed. When libpysal.graph.Graph object is passed as w, this statement does not apply as the Graph is immutable and does not contain the original untransformed weights (by design).

esda/moran.py Outdated Show resolved Hide resolved
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
@@ -67,7 +67,8 @@ class Moran:
transformation : string
weights transformation, default is row-standardized "r".
Other options include "B": binary, "D":
doubly-standardized, "U": untransformed
doubly-standardized, "O": restore original transformation
(applicable only if ``w`` is passed as ``W``)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This clarification should be present in all docstrings below.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Sorry--I'm a bit new at the pull request thing. I updated all of the docstrings in my own repository, but those changes weren't reflected here. How do I make the changes show up in the pull request itself, without opening a new PR? Thanks for bearing with me.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I think I've figured it out. Thanks again for bearing with me as I learn!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I think I've figured it out. Thanks again for bearing with me as I learn!

@JasonSteelmanCoder Your contribution is important for us and we welcome your efforts!

@JasonSteelmanCoder
Copy link
Author

Is this ready to be merged?

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

Successfully merging this pull request may close these issues.

4 participants