qtconsole not rendering Matrix correctly?

瀏覽次數:41 次
跳到第一則未讀訊息

Reckoner

未讀,
2011年8月16日 下午4:35:422011/8/16
收件者:sympy
Hi,

I'm using Ipython 0.11 with the sympy profile with version 0.7.1 and
the Matrix object is not rendered correctly. There are lots of little
"?" signs on the borders where the edges of the matrix should be.

any ideas?

this is on windows xp with python 2.6

Thanks!

Aaron Meurer

未讀,
2011年8月16日 下午4:53:562011/8/16
收件者:sy...@googlegroups.com
It works fine for me.

Likely the problem is the unicode font we use to print the Matrix
brackets. Does [1/x] print correctly? What if you enter

print u"""
⎡1⎤
⎢─⎥
⎣x⎦
"""

? If not, then I guess you need to get better fonts. I can't tell
you too much, as I didn't develop IPython. You might bring it up on
their users list.

Aaron Meurer

> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To post to this group, send email to sy...@googlegroups.com.
> To unsubscribe from this group, send email to sympy+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
>
>

Reckoner

未讀,
2011年8月16日 下午5:13:462011/8/16
收件者:sympy
Yes,1/x prints fine. Every sqrt() prints fine. I'm just having trouble
with Matrix.

Aaron Meurer

未讀,
2011年8月16日 下午5:39:272011/8/16
收件者:sy...@googlegroups.com
No, I mean [1/x]. That is, a list with a single element, which is
1/x. The brackets that we use to print lists are exactly the same as
the ones we use to print matrices.

To be more clear, perhaps I should have asked you to try [1, 1/x].

Aaron Meurer

Reckoner

未讀,
2011年8月17日 上午11:07:552011/8/17
收件者:sympy
Thanks for the clarification. No, [1/x] does not print out correctly.
It is surrounded by a bunch of "?" symbols. Additionally, [1, 1/x]
does not print out correctly either.

Thanks again.

Aaron Meurer

未讀,
2011年8月17日 下午3:01:232011/8/17
收件者:sy...@googlegroups.com
So the problem is that you don't have those symbols in whatever font
the qtconsole uses. I don't know how to change the font that it uses
(you'd have to ask on the IPython list), but you might try just
installing a monospace font that has them. I know that DejaVu Sans
Mono, the font I use, has them (this is also an excellent monospaced
font anyway, and I've found that pretty printed expressions look
really nice in it). I don't know how Windows works, but in Mac OS X
and Linux, font substitution happens automatically, so perhaps if you
install this font it will just start working.

Aaron Meurer

回覆所有人
回覆作者
轉寄
0 則新訊息