NumPy: Save a NumPy array to a text file
NumPy: Array Object Exercise-32 with Solution
Write a NumPy program to save a NumPy array to a text file.
import numpy as np a = np.arange(1.0, 2.0, 36.2) np.savetxt('file.out', a, delimiter=',')
Python Code Editor:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
What is the difficulty level of this exercise?
New Exercises:R Programming