Hello.
Where can I find *list* of all *functions*, which I can use is *sympy*
*string*, with *sympify* function?
I mean functions like:
sin, cos, tan, cot, abs, log, pi, etc. ect. (ALL)
like
sympify("sin(pi/2)", evaluate=True)
Thank you Mike
--
You received this message because you are
Hello.
I'm trying to modify sympy to avoid of hanging, when numer which is gonna
to be computed is tu large. I know how to *raise exception*, but In which
file should i look for power computing without eval?
In *core/numbers.py* there are mothods for evaluation of numbers. But where
should I
Hey, thank you. But *flatten* is executed only then, when argument is
symbol, like *2 * x * x* (i.e.). But where is code of numbers eval?
sobota, 5 czerwca 2021 o 14:01:46 UTC+2 smi...@gmail.com napisał(a):
> processing of args, I believe, is handled in Add.flatten and Mul.flatten
>
> /c
>
> On
Hi.
Where can I find code, that evaluates *Add* and *Mul* operations on real
numbers? I've found the code in *Pow* file (sympy/core/power.py). I know
that there are move files in that dir:
(sympy/core/add.py)
(sympy/core/mul.py)
But I cannot find the line of evaluation.
I.E. where is code
Now we need to know, where in *mul.py* and *add.py* is code which evaluates
number. We need to block such code as:
10 * 10 ** 1
piątek, 4 czerwca 2021 o 13:54:37 UTC+2 Michał Pawłowski napisał(a):
> Ok, I've made one mistake. There it go:
>
> *if evaluate:*
> if
Ok, I've made one mistake. There it go:
*if evaluate:*
if b.is_number and e.is_number:
if e * _log10(b) > 1:
raise ValueError('too big value')
without _pow. Now it works
piątek, 4 czerwca 2021 o 13:44:03 UTC+2 Michał Pawłowski napisał(a):
> Oh, dear I s
Oh, dear I see now that is doesnt work everytime, I need to code more :/
piątek, 4 czerwca 2021 o 13:39:58 UTC+2 Michał Pawłowski napisał(a):
> Hey, I've fixed it :)
>
> Just add to *sympy/core/power.py* condition, that checks how many decimal
> digits has power expression. I've a
C+2 asme...@gmail.com napisał(a):
> This is somewhat of an open problem for SymPy. You can see some of the
> ideas around it at https://github.com/sympy/sympy/issues/6835.
>
> Aaron Meurer
>
> On Thu, Jun 3, 2021 at 8:46 AM Michał Pawłowski
> wrote:
> >
> >
Hi.
I have problem. I'd like to secure of too high computed value to prevent of
SymPy Hang.
I. E.:
latex(expand("2**10**10**10", evaluate=True))
When I execute it by python script it hangs (value is too big). How to
prevent of it?
Thank You!
--
You received this message because you are
Hi.
I have problem. I'd like to secure of too high computed value to prevent of
SymPy Hang.
I. E.:
latex(expand("2**10*10**10", evaluate=True))
When I execute it by python script it hangs (value is too big). How to
prevent of it?
Thank You!
--
You received this message because you are
Thank you all of you. Thank you so much.
Michał Pawłowski
wtorek, 23 lutego 2021 o 00:24:08 UTC+1 javier.a...@gmail.com napisał(a):
> Hi!
>
> I knew my code was bad, but not so bad. Hahaha! I just wish I could remove
> my message from the archive...
>
> Sorry for the noise.
gt; El 22 feb 2021, a las 12:44, Michał Pawłowski
> escribió:
>
> Hi.
>
>
> I'd like to get polynomial qualifiers returned as array, in example:
>
> getQualifiers("4*x**2+8*x+4")
> [4, 8, 4]
>
> or
>
> getQualifiers("4*x**2+4")
> [4
Hi.
I'd like to get polynomial qualifiers returned as array, in example:
getQualifiers("4*x**2+8*x+4")
[4, 8, 4]
or
getQualifiers("4*x**2+4")
[4, 0, 4]
Is it possible?
Thanks
Mike
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe
Hi.
I'd like to get LaTeX code of formula, but without simplification or
expanding. I.E:
formula_1 = '2+x+x**2'
print(latex(expand(formula_1))) <- this works but it sorts the formula
print(latex(???)) -> 2+x+x^{2} #HOW TO GET THIS?
Thanks
Mike.
--
You received this message because you are
Ok, I've found the solution!
I need to put the formula *inside* of *quotes*. And then pass it through
*simplify* or *expand* functions.
The error will have such code:
*OtherError: *
Thanks
Mike
czwartek, 11 lutego 2021 o 11:25:06 UTC+1 Michał Pawłowski napisał(a):
> Hi.
>
>
Hi.
I'd like to manage situation, when the formula, which I'd like to process
has syntax error.
I tryied to use *try except* blocks, but its doesn't work, how can I
achieve it?
#!/usr/bin/python3
from sympy import *
x = Symbol('x')
try:
val_1 = x*sin(x)**2+x*cos(x)**2*
except
Thank you so much, it works great now! :)
I haven't installed it. I have newest version I used to used git pull ..
Thank U
Mike
środa, 10 lutego 2021 o 22:14:07 UTC+1 Oscar napisał(a):
> Do you particularly want to use the master version of sympy from git?
>
> It's usually better to use the
Thanks.
I used git clone ... thats all
środa, 10 lutego 2021 o 21:53:02 UTC+1 Oscar napisał(a):
> On Wed, 10 Feb 2021 at 20:47, Michał Pawłowski
> wrote:
> >
> > Hi.
> >
> > I have such problem.
> >
> > I've created py file:
> >
> >
Thank you for quick reply.
I'm not sure. I've input
git clone ...
Thats all.
śr., 10.02.2021, 21:53 użytkownik Oscar Benjamin
napisał:
> On Wed, 10 Feb 2021 at 20:47, Michał Pawłowski
> wrote:
> >
> > Hi.
> >
> > I have such problem.
> >
> > I've c
Hi.
I have such problem.
I've created py file:
#!/usr/bin/python3
from sympy import *
x = Symbol('x')
print(expand(sin(x)*(x-1)*(x+1)))
When it is inside of SymPy lib dir, it returns correct result in console.
But, when I put it not inside the lib dir, it tells me, that:
NameError: name
Thank you very much! :)
środa, 10 lutego 2021 o 20:22:09 UTC+1 gu...@uwosh.edu napisał(a):
> `print(expand((x**2+1)*(x-1)))`
>
> On Wednesday, February 10, 2021 at 1:20:38 PM UTC-6
> michal.bozyd...@gmail.com wrote:
>
>> Thank you. It works in this example. But if I'd like to do this:
>>
>>
Thank you. It works in this example. But if I'd like to do this:
print((x**2+1)*(x-1))
It prints me string without compute it. I'd like to have :
x**3-x**2+x-1
Is it possible?
Thanks Mike
środa, 10 lutego 2021 o 19:59:55 UTC+1 gu...@uwosh.edu napisał(a):
> wrap your expression in a
Hi.
I'd like to generate code of simplified formula. I.E:
When I pass: 1+x+x**2+x**3
I'd like to have: x**3+x**2+x+1
Is it possible to achieve it?
Thanks
Mike
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop
23 matches
Mail list logo