Difference between data types (int8 and float)

You are talking nonsense. int8_t is 1 byte, float is 4 bytes. You are allocating 2000 bytes of memory with int8_t but 8000 bytes with float. Why do you think float will take less space? You tell the program to allocate 2000 elements not more not less and this is what it will try to do.