Open shriyajuneja opened 6 years ago
MemoryError Traceback (most recent call last) in () 1 from sklearn.feature_extraction.text import CountVectorizer 2 cv = CountVectorizer(max_features = 1500) ----> 3 x__train = cv.fit_transform(corpus).toarray() 4 x__test= cv.fit_transform(corpus1).toarray() 5 y = train_data.iloc[:, 2].values
c:\users....\appdata\local\programs\python\python36-32\lib\site-packages\scipy\sparse\compressed.py in toarray(self, order, out) 941 if out is None and order is None: 942 order = self._swap('cf')[0] --> 943 out = self._process_toarray_args(order, out) 944 if not (out.flags.c_contiguous or out.flags.f_contiguous): 945 raise ValueError('Output array must be C or F contiguous')
c:\users......\appdata\local\programs\python\python36-32\lib\site-packages\scipy\sparse\base.py in _process_toarray_args(self, order, out) 1128 return out 1129 else: -> 1130 return np.zeros(self.shape, dtype=self.dtype, order=order) 1131 1132 def numpy_ufunc(self, func, method, pos, inputs, **kwargs):
MemoryError:
I have gotten the same error with my own notebook and colab. Might the program has some problem
MemoryError Traceback (most recent call last)