X_train_mmap = np.memmap('my_array.mmap', dtype=np.float16, mode='w+',
    shape=(n_samples, n_features))
clf = IncrementalPCA(n_components=50).fit(X_train_mmap)
Using memmap files for batch processing