Matthew Brett

Results 222 comments of Matthew Brett

Sorry - I'm afraid I have been crazy busy these last weeks. I will try very hard to get to this at the weekend. Thanks for the reminder.

I was expecting more to the traceback there. The problem is that you're asking for floating point data (with `get_fdata`) on the image dtype which is the RGB thing, and...

Sorry - can I reopen this one? Thinking about it, I think we used to imply, but perhaps not say, that the cached array becomes definitive after it has reached...

The reason we might fix it is to maintain the model, which is that the image appears to contain the array returned by `get_fdata` or `get_data`, and therefore, if you...

I'm afraid I think we have to email out about this, to see what people think - because it's possible people's results will change, without them realizing. We could certainly...

Ouch - I'm glad you remembered these. Am I right that `get_fdata()` will only needlessly coerce an int-backed image to float if the header has scaling factors? Otherwise, `np.array(img.dataobj)` will...

Sorry - yes - I meant that `get_fdata` will always coerce to float, but this will be needless only in the case where there are no scalefactors. I agree that...

Another option would be to add ```python out_arr.setflags(write=False) ``` on the way out of `get_fdata`. Yes it would be breaking change, potentially, but at least it would mean that no-one's...

Hmm - but that would be rather confusing too - no - that you could get a read-only array sometimes? I mean, that would be rather hard to explain. Honestly,...

Just coming back to this, as @neurolabusc just prodded me (thanks Chris). Thinking about it quickly now, we have a few options for optional support (sketches). Starting with `arr =...