def __str__(self):
"""
IntArrayParameter needs to "truncate" the array by temporarily
overriding np.set_printoptions
"""
opt = np.get_printoptions()
# Value:_ takes 7 characters
np.set_printoptions(threshold=8, edgeitems=3, linewidth=opt['linewidth']-7)
str_ = super(IntArrayParameter, self).__str__()
np.set_printoptions(**opt)
return str_
评论列表
文章目录