I have this 4D array (numpy.ndarray) that I need to save in a way that its format does not change as I save it (since it should remain unchanged), and then reuse it in my Google Colab file. I have tried saving it in different formats and when I upload it and preview it within my code, the previous format is no longer preserved even when I save it in the .npy format. I have also tried importing the date using the raw link from my GitHub repository or uploading it from my local device, but still no chance. I would appreciate your comments regarding the issue!
Further elaboration:
Here is the code that I use to generate my 4D array:
num1=100000
size = (num1, 8, 4, 4)
prob_0 = 0.3 # 30% of zeros
prob_1 = 1 - prob_0 # 70% of ones
P = np.random.choice([0, 1], size=size, p=[prob_0, prob_1])
I need to save this P as a file and use it in Google Colab. I have to save it in order to maintain the initial data and not come up with a different 4D array every time I run my code. This data (i.e. P) must remain unchanged.