-
Notifications
You must be signed in to change notification settings - Fork 260
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
ENH: Add GIFTI object __repr__ methods #1092
Conversation
Helps with working on BIAP9, but long overdue
Codecov Report
@@ Coverage Diff @@
## master #1092 +/- ##
==========================================
- Coverage 92.33% 92.23% -0.11%
==========================================
Files 99 99
Lines 12219 12231 +12
Branches 2392 2392
==========================================
- Hits 11283 11281 -2
- Misses 612 624 +12
- Partials 324 326 +2
Continue to review full report at Codecov.
|
Ping me if you haven't heard by 3 EST tomorrow |
@@ -375,6 +390,9 @@ def __init__(self, | |||
self.ext_offset = ext_offset | |||
self.dims = [] if self.data is None else list(self.data.shape) | |||
|
|||
def __repr__(self): | |||
return f"<GiftiDataArray {intent_codes.label[self.intent]}{self.dims}>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not knowing how this would work precisely, do you maybe need a space?
return f"<GiftiDataArray {intent_codes.label[self.intent]}{self.dims}>" | |
return f"<GiftiDataArray {intent_codes.label[self.intent]} {self.dims}>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This currently shows as: <GiftiDataArray pointset[32492, 3]>
. Your change would make it <GiftiDataArray pointset [32492, 3]>
. I don't have a strong opinion on the aesthetics here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just me being nitpicky, I think. I also have no strong opinion but I know spaces are easy to miss in the f-strings when they get crowded like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks for the reviews! |
Helps with working on BIAP9, but long overdue.
Being able to quickly view data array intent and shape was the motivator here.