import numpy as np
from sklearn.decomposition import IncrementalPCA
ut = np.memmap('my_array.mmap', dtype=np.float16, mode='w+', shape=(140000,
    3504))
clf = IncrementalPCA(copy=False)
X_train = clf.fit_transform(ut)
Using memmap files for batch processing