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
Added __repr__ to Moran I #527
Conversation
I like the idea of having more informative repr . We probability should think through a consistent look/style for all of PySAL. Do we want to use repr and/or summary functions/methods as well? |
Agreed on standardization. The lazy way might be to write a decorator for classes that automatically adds a repr method with all of the attributes to a string. It might be better looking and more useful to do this by hand. |
Let's keep this open to flesh out ideas on a standardized approach. |
@ipython_tutorial -> repr on geometries would be sweet - not that |
@jlaura is this available in your branches? I was thinking about trying to push on this, maybe also adding special pretty printing for IPython notebook environments. Github tells me it's from an "unknown repository:" |
It looks like I axed the branch, but the commit lives on in an old PR: Also checkout how pandas manages the to_* methods. I think that this https://github.com/pydata/pandas/blob/355b4623d842633746b29b6e7f1724af4cd87dae/pandas/core/format.py On Thu, Jul 30, 2015 at 11:53 AM, Levi John Wolf notifications@github.com
|
oh woah, didn't realize these changes got merged in a different PR. Should this get closed? Yes on the outputting stuff. Taking inspiration from how they design their interfaces is smart, I think. This could go into stuff like an |
I hadn't realized that this was merged either.... What I can do is manually back it out (just that commit)? This must have On Thu, Jul 30, 2015 at 1:06 PM, Levi John Wolf notifications@github.com
|
There's probably a tool to visualize the git graph somewhere. That'd show what would cascade. |
Since the change in that commit is just the repr addition, I would Are we better leave it, knowing that someone is looking at adding repr On Thu, Jul 30, 2015 at 1:43 PM, Levi John Wolf notifications@github.com
|
I don't think this got merged into master? At least moran.py doesn't look to have the new |
+1 https://github.com/pysal/pysal/search?utf8=✓&q=__repr__ No need for a roll back. On Thu, Jul 30, 2015 at 2:16 PM, Sergio Rey notifications@github.com
|
I think it got pulled in and out over the course of #601. That said, this PR is weird and should probably get refreshed since we can't add to it if the source is deleted. Apparently github copies the source into a hidden branch in the target so that the PR can still get merged if the source is deleted. However, I'm not sure whether you can just reopen the source with the same branch name... |
Revisit at Scipy 2106 to assign modules to implement this for. |
While the memory address returned is highly informative....I thought that it would be nicer to see a better representation of the class. Perhaps this is a template for other classes?
Here is an example, generated on a network using GeoDaNet Crimes data and counts per edge.