np.savetxt() do in NumPy?np.savetxt() saves a NumPy array to a text file. It writes the array data in a readable text format, like CSV or space-separated values.
You use np.loadtxt(). It reads numbers from a text file and returns them as a NumPy array.
np.savetxt() controls the format of saved numbers?The fmt parameter controls how numbers are saved, for example, fmt='%.2f' saves numbers with two decimal places.
np.loadtxt() read files with comments or headers?Yes, you can skip lines with skiprows and ignore comments with the comments parameter.
np.savetxt() and then load it back with np.loadtxt()?You get the same 2D array back, as np.savetxt() writes rows line by line and np.loadtxt() reads them back into a 2D array.
np.savetxt() saves arrays to text files. np.loadtxt() reads from text files.
np.loadtxt()?The parameter skiprows=3 tells np.loadtxt() to skip the first 3 lines.
fmt parameter in np.savetxt() control?fmt controls how numbers are formatted when saved, like decimal places.
np.loadtxt() ignore them?The comments='#' parameter tells np.loadtxt() to ignore lines starting with '#'.
np.loadtxt() return?np.loadtxt() returns a NumPy array with the data read from the text file.