numpy.savetxt
saves an array to a text file.
import numpy
a = numpy.asarray([ [1,2,3], [4,5,6], [7,8,9] ])
numpy.savetxt("foo.csv", a, delimiter=",")
More Related Contents:
- load csv into 2D matrix with numpy for plotting
- Sorting arrays in NumPy by column
- Performance of Pandas apply vs np.vectorize to create new column from existing columns
- Python csv string to array
- Reshape an array in NumPy
- Frequency counts for unique values in a NumPy array
- Selecting specific rows and columns from NumPy array
- How do I create an empty array and then append to it in NumPy?
- Immutable numpy array?
- How to get a list of all indices of repeated elements in a numpy array
- Binary random array with a specific proportion of ones?
- How to split a numpy array in fixed size chunks with and without overlap?
- Loading UTF-8 file in Python 3 using numpy.genfromtxt
- Efficient distance calculation between N points and a reference in numpy/scipy
- Compress numpy arrays efficiently
- Add multiple values to one numpy array index
- Index 2D numpy array by a 2D array of indices without loops
- Flattening a list of NumPy arrays?
- Element-wise string concatenation in numpy
- Fastest pairwise distance metric in python
- Partition array into N chunks with Numpy
- Numpy Vector (N,1) dimension -> (N,) dimension conversion
- How is numpy’s fancy indexing implemented?
- Numpy shuffle multidimensional array by row only, keep column order unchanged
- Randomly select from numpy array
- Extract csv file specific columns to list in Python
- How to “scale” a numpy array?
- ValueError: x and y must be the same size
- Generate random array of floats between a range
- Numpy `ValueError: operands could not be broadcast together with shape …`