Replace TypicalMemoryError by improve_memory_error_message