list(_.iter_all_coeffs()) does what I want. I will still take a look at
Mateusz's work.
Thanks for the help guys.
Bill
smichr wrote:
If you use .iter_all_coeffs() I think you will get what you want:
###
Poly(x**2+1,x)
Poly(x**2 + 1, x)
list(_.iter_all_coeffs())
[1, 0, 1]
###
I am trying to combine an expression containing similar exponents that
are multiplied to each other ...
In [20]: wn
Out[20]: (1/m)**(1/2)*(k1 + k2 + k3)**(1/2)
In [21]: together(wn)
Out[21]: (1/m)**(1/2)*(k1 + k2 + k3)**(1/2)
but I would like something like
In [21]: together(wn)
Out[21]:
On Tue, Apr 7, 2009 at 7:32 PM, Fredrik Johansson
fredrik.johans...@gmail.com wrote:
The simplest workaround would be to recognize simpler forms for units
at the pretty-printing stage.
For my particular application I need a simpler 'pretty form'. I am trying
to do something similar to the
A hack I'm going to use for now is changing the return in
str.StrPrinter._print_Real to the following
class StrPrinter
...
...
def _print_Real(self, expr):
prec = expr._prec
if prec 5:
dps = 0
else:
dps = prec_to_dps(expr._prec)
If you want, as an exercise, try to run all sympy tests with your
patch to see if something gets broken.
I ran the test_evalf test. (see Issue
1052http://code.google.com/p/sympy/issues/detail?id=1052).
I will try running the other tests.
Is there a 'top-level' script to do this?
If not, try
I have seen issues 1019 and 1052 on how to handle printing of sig.
digits but haven't seen a solution. I am running the attached script
and getting things like
pH =
[ 95.0]
[-40.0]
[ 60.0]
I preprocessing this script with another python script and inserting
All,
To introduce myself, I am in my second semester of grad school at
Southern Illinois University Edwardsville. I use python for pretty
much everything I do programming wise but I am far from knowledgeable
(about a year experience). I really enjoy programming and I try to
make an excuse to
Ondrej, thanks for your quick reply.
I implemented this functionality to trigsimp. I added lines 751-762 to
simplify.simplify.trigsimp() as follows (for the future googler):
-
a,b,c = map(Wild,'abc')
matchers = (