Conversation
This is a draft for community feedback. I would like to know 1. Are there header/affine check functions that already exist in nibabel that I can reuse? 2. more efficient way to add more operators? I have to admit I am not super familiar with a lot of tools related to class object that comes with python.
|
Hello @htwangtw, Thank you for updating! Cheers! There are no style issues detected in this Pull Request. 🍻 To test for issues locally, Comment last updated at 2021-06-21 13:21:22 UTC |
Codecov Report
@@ Coverage Diff @@
## master #1014 +/- ##
==========================================
+ Coverage 92.26% 92.29% +0.03%
==========================================
Files 100 101 +1
Lines 12201 12265 +64
Branches 2134 2144 +10
==========================================
+ Hits 11257 11320 +63
Misses 616 616
- Partials 328 329 +1
Continue to review full report at Codecov.
|
|
Hi @htwangtw, I'm interpreting the |
|
I found the draft function not particular meaningful to me so I just make it a normal PR...
|
Nope. No avoiding it. The only other way to do it would be by allowing
It's a valid IEEE754 value. You pays your money, you takes your chances.
I'm not sure what the
You could do something like: class OperableImage:
def _binop(self, val, *, op):
...
def _unop(self, *, op):
... |
|
Hey @effigies - I tried to add some |
Closes #939.
This is a draft for feedback. Any suggestion is welcome!
I am not very familiar with python class so please let me know if there's things in python I haven't taken advantage of already. I would like to know:
nibabelthat I can reuse?__and__ = partial(_op, op=operator.__and__)To-do
fslmathsas a reference dealing with masking 4D array with 3D image