You want to reshape
the array.
B = np.reshape(A, (-1, 2))
where -1
infers the size of the new dimension from the size of the input array.
More Related Contents:
- Using numpy to build an array of all combinations of two arrays
- Difference between numpy.array shape (R, 1) and (R,)
- Understanding NumPy’s einsum
- What are the differences between numpy arrays and matrices? Which one should I use?
- Intuition and idea behind reshaping 4D array to 2D array in NumPy
- numpy matrix vector multiplication [duplicate]
- Why is numpy’s einsum faster than numpy’s built in functions?
- Calculate mean across dimension in a 2D array
- Numpy matrix to array
- how does multiplication differ for NumPy Matrix vs Array classes?
- Selecting specific rows and columns from NumPy array
- Subsetting a 2D numpy array
- Check if two 3D numpy arrays contain overlapping 2D arrays
- Selecting Random Windows from Multidimensional Numpy Array Rows
- How to split a numpy array in fixed size chunks with and without overlap?
- how to perform max/mean pooling on a 2d array using numpy
- How to find the index of a value in 2d array in Python?
- What is the difference between ndarray and array in NumPy?
- Why does numpy.linalg.solve() offer more precise matrix inversions than numpy.linalg.inv()?
- NumPy array/matrix of mixed types
- Convert row vector to column vector in NumPy
- Numpy select rows based on condition
- Python: how to store a numpy multidimensional array in PyTables?
- Access n-th dimension in python [duplicate]
- How does the axis parameter from NumPy work?
- Mapping a NumPy array in place
- How to convert a 3d numpy array to 2d
- Python/NumPy first occurrence of subarray
- subsampling every nth entry in a numpy array
- numpy reverse multidimensional array