I read the MNIST dataset and put the labels inside the y-variable. It's a ndarray object containing 70000 instances of labels and its shape is (70000,) Now, I wish to convert the labels to float64, but my interpreter tells "maximum supported dimension for an ndarray is 32, found 70000".
So I don't understand why it originally contains 70000 instances as an ndarray object without any problem and than reports this error when trying to convert the internal datatype.
import pandas as pd
import numpy as np
print(type(y))
print(y.shape)
y = np.ndarray(y,dtype=np.float64)
print(X.dtype,y.dtype)
data = pd.DataFrame()
Output:
<class 'numpy.ndarray'>
(70000,)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-41-5d7ca8b0f5a9> in <module>
3 print(type(y))
4 print(y.shape)
----> 5 y = np.ndarray(y,dtype=np.float64)
6 print(X.dtype,y.dtype)
7 data = pd.DataFrame()
ValueError: maximum supported dimension for an ndarray is 32, found 70000