Question: using PCA (principle component analysis) to extract features from a set of 4K images giving me the memory error

*File "/home/paul90/.local/lib/python3.6/site-packages/sklearn/decomposition/\_pca.py", line 369, in fit\_transform
 U, S, V = self.\_fit(X)*

***MemoryError: Unable to allocate array with shape (23339520, 40) and data type float32***

I am trying to extract 30 features (# of components) from 4K images and getting this error.

* ***Pseudocode:***

***immatrix = np.array([np.array(Image.open(im, 'r')).flatten() for im in file\_list], 'f')***

***x = StandardScaler().fit\_transform(immatrix)***

***pc\_train = pca.fit\_transform(x)***

Filelist is list of images (currently I have 600 images)

I can't reduce the number of images in the list and can't reduce the initial 4K resolution. In this context,how can I solve this memory allocation issue?

It will be a great help if anyone can tell me the steps to avoid the memory issues.

Answer: 
Since the property is owned by `navigator` prototype you need to delete this property from prototype.

**Only tested in Chrome. This might not work in another browsers** because most DOM related objects are exotic.

```js
console.log(window.navigator.appName)

delete Object.getPrototypeOf(window.navigator).appName;

console.log(window.navigator.appName)
```
It is impossible to delete (or change) any of the properties of `window.navigator`, as it is a read-only object created and managed by the web browser.