I think that we should raise an exception if we are given a non integer type:
<pre>
mask = mask_img.get_data()
assert mask.dtype.kind == 'i', "Meaningful error message"
</pre>

I can see people shooting themselves in the foot because there are not careful with what they do.

What do you think?