That was more of a test of re-allocation of memory (i.e. let's make sure there's no memory leaks), but there may be issues with total available memory.
Although the original image is only 20 MB, that's in its compressed state. It's a bit more than twice that as uint8 (uncompressed state). And when converted to float (which is preferable so basic math doesn't go crazy without some hand-holding), it's closer to 400 MB. Combine that with the fact that the conversion ends up copying the image due to some simple operations, and you're looking at about 1.5 GB. (I haven't actually tried verifying the memory usage, so don't quote me on that).
How much memory does your system have? Also, just as a check: Are you running 64-bit python (this is displayed when you start up the python interpreter.)