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 |
| 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.
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.
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.
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.
|
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.