Setting TFloat Texture from Numpy Array

No the above code snippet fails for me with the following error:

self.texture.setRamImage(CPTAUchar(p))

AssertionError: compression != CM_off || image.size() == do_get_expected_ram_image_size() at line 830 of panda/src/gobj/texture.cxx