基本上当我:load name.hs变量和绑定消失了.
有没有选择告诉ghci保留一切?
我目前有以下代码段:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import numpy
from numpy import linalg
A = [[1,2,47,11],[3,2,8,15],[0,0,3,1],[0,0,8,1]]
S = [[113,49,2,283],[-113,0,3,359],[0,5,0,6],[0,20,0,12]]
A = numpy.matrix(A)
S = numpy.matrix(S)
numpy.set_printoptions(precision=2, suppress=True, linewidth=120)
print("S^{-1} * A * S")
print(linalg.inv(S) * A * S)
Run Code Online (Sandbox Code Playgroud)
产生这个输出:

是否有标准的方法来生成类似于以下的输出?我怎样才能得到这个输出?
[[ -1 -0.33 0 0]
[ 0 1 0 0]
[ 0 -648 4 0]
[ 0 6.67 0 5]]
Run Code Online (Sandbox Code Playgroud)
有什么不同?
i的第一个字符之间至少有两个空格i+1,但如果需要更多,则可能更多(NumPy输出生成两个空格)BetterPythonConsole混乱它)-0但是00.但是0编辑 …