Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Saving and Loading Arrays to/from Files | Getting into NumPy Basics
Getting into NumPy Basics
course content

Contenido del Curso

Getting into NumPy Basics

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 .npy format;
  • savez(): Saves multiple arrays to a single compressed .npz file;
  • savetxt(): Saves an array to a text file;
  • load(): Loads an array from a binary file in NumPy's .npy format;
  • loadtxt(): Loads an array from a text file.

Tarea

  1. Save the newly created array in NumPy's .npy format.
  2. Save the array to a text file.
  3. Load back in the array.

Tarea

  1. Save the newly created array in NumPy's .npy format.
  2. Save the array to a text file.
  3. Load back in the array.

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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

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 .npy format;
  • savez(): Saves multiple arrays to a single compressed .npz file;
  • savetxt(): Saves an array to a text file;
  • load(): Loads an array from a binary file in NumPy's .npy format;
  • loadtxt(): Loads an array from a text file.

Tarea

  1. Save the newly created array in NumPy's .npy format.
  2. Save the array to a text file.
  3. Load back in the array.

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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 1. Capítulo 7
We're sorry to hear that something went wrong. What happened?
some-alt