Course Content
Getting into NumPy Basics
 Saving and Loading Arrays to/from Files
Saving and Loading Arrays to/from Files
NumPy offers a variety of functions for saving and loading numPy arrays to and from files, such as:
- save(): Saves an array to a binary file in- NumPy's- .npyformat;
- savez(): Saves multiple arrays to a single compressed- .npzfile;
- savetxt(): Saves an array to a text file;
- load(): Loads an array from a binary file in- NumPy's- .npyformat;
- loadtxt(): Loads an array from a text file.
Task
Swipe to start coding
- Save the newly created array in NumPy's.npyformat.
- Save the array to a text file.
- Load back in the array.
Solution
Congratulations!
Congratulations on completing this NumPy tutorial! You have gained substantial knowledge about handling arrays and matrices in Python, laying down a strong foundation for utilizing NumPy in your data processing and analysis endeavors.
Mark tasks as Completed
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 7
AVAILABLE TO ULTIMATE ONLY