'How to create numpy array for a dataset?

I've a dataset of almost 3k colored images each of dim 1920x1080 and I want to store it in a numpy array so when calling shape on it in returns (3716,493,491,3)

import numpy as np
from matplotlib import pyplot as plt

for fname in train_paths:
    img_dataset = np.append(array,plt.imread(fname))

print(img_dataset.shape)

the train_paths is an array contains image path the output is (729907,) and i cant find out what (729907,) reflect??



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source