假设我有2个numpy数组:
import numpy as np
a = np.array([1, 2, 3, 4 ], dtype='float64')
b = np.array([1, 2.0034, 4, 5.4322], dtype='float64')
c = np.array([1, 2, 3.1234, 5.321 ], dtype='float64')
print('a is : ', a)
print('b is : ', b)
print('c is : ', c)
这将打印为:
a is [1. 2. 3. 4.]
b is [1. 2.0034 4. 5.4322]
c is [1. 2. 3.1234 5.321 ]
# How nicely the bottom two arrays are aligned! Because they have equal precessions.
但是我想将它们全部对齐打印。如下所示:
a is [1. 2. 3. 4.]
b is [1. 2.0034 4. 5.4322]
c is [1. 2. 3.1234 5.321 ]