float has no attribute nbytes, so this will fail in that case, I think.