[sympy] Re: New member Introduction

2020-09-20 Thread Ben
Hello Ramanathi, Did you take a look at https://github.com/sympy/sympy/wiki/Introduction-to-contributing ? There's a link to https://github.com/sympy/sympy/wiki/Development-workflow For "easy to fix", see https://github.com/sympy/sympy/issues?q=is%3Aopen+is%3Aissue+label%3A%22Easy+to+Fix%22

[sympy] Re: Introducing myself.

2020-09-20 Thread Ben
+is%3Aissue+label%3A%22Easy+to+Fix%22 Kindly, Ben On Monday, September 14, 2020 at 11:19:12 AM UTC-4 prasanna...@gmail.com wrote: > Hi, > I am Prasanna Bartakke, second-year undergrad at IIT Madras. I want to > start contributing to open source and Sympy would be a good start

Re: [sympy] how to reference "much greater than"

2020-08-22 Thread Ben
b**2*x + b**2) > >>> # Expand as a series up to O(x**2) > >>> expr.subs(a, b/x).cancel().series(x, n=2) > x/b**2 + O(x**2) > >>> # Remove the O() term and substitute back > >>> expr.subs(a, b/x).cancel().series(x, n=2).removeO().subs(x, b/a) &g

[sympy] Re: Wes Galbraith (Introduction)

2020-08-15 Thread Ben
Hello Wes, In your calculus tutoring app, how do users input the expressions? Using a set of buttons in a GUI, using Latex, or some other mathematical markdown? My motive for asking is to understand the process you're using for parsing input expressions. On Sunday, June 14, 2020 at 2:24:12

[sympy] Re: New Member Intorduction

2020-08-15 Thread Ben
Welcome! Thanks for looking for ways to contribute to the project. I'm a user of SymPy, so I appreciate all the volunteer efforts that running a complicated software project takes. On Monday, August 3, 2020 at 7:49:55 PM UTC-4 xavier...@gmail.com wrote: > Hi Sympy Community, > > My name is

[sympy] Re: Brief Introduction

2020-08-15 Thread Ben
s. What do you mean by "'coordinate free' representations of mathematical objects"? Kindly, Ben On Friday, August 14, 2020 at 3:30:42 PM UTC-4 csc...@captechu.edu wrote: > Hello All, > > My name is Conrad Schiff. I am an adjunct professor of physics (with > some mathematics and en

[sympy] how to reference "much greater than"

2020-08-15 Thread Ben
Hello, I'm attempting to translate Latex into SymPy and am seeking guidance on how to handle the notation of "much greater than ." For example, "a + b = c" is replaced by "a = c" under the condition "b << a". How would that be represented in

Re: [sympy] validating dimensional consistency of expression

2020-06-02 Thread Ben
ensional_dependencies_for_name for k, v in d.items(): AttributeError: 'NoneType' object has no attribute 'items' I think the reason is the Mul. However, I do not know how to simplify to Dimension >>> type(mass*length) >>> type(sympy.Mul(mass, length)) >>> sympy.si

Re: [sympy] validating dimensional consistency of expression

2020-05-28 Thread Ben
gt; m = mass >>> a = length / time**2 >>> dimsys_SI.equivalent_dims( eq.lhs, eq.rhs ) False >>> dimsys_SI.equivalent_dims( eval(str(eq.lhs)), eval(str(eq.rhs)) ) True Should I open an issue on github for this? On Wednesday, May 27, 2020 at 9:48:02 PM UTC-4, Ben wrote: > &g

Re: [sympy] validating dimensional consistency of expression

2020-05-27 Thread Ben
e**2) >>> m Dimension(mass, M) On Wednesday, May 27, 2020 at 8:59:42 PM UTC-4, Aaron Meurer wrote: > > Why are you using eval(str(eq.lhs))? That should just give back eq.lhs. > > Aaron Meurer > > On Wed, May 27, 2020 at 6:35 PM Ben > > wrote: > > > >

Re: [sympy] validating dimensional consistency of expression

2020-05-27 Thread Ben
he symbols in an expression with eq.free_symbols. Or > if you know the symbol is F you can just set > > F = symbols('F') > > since symbols with the same name are equal, so F will be the same as > the symbol F in the expression from parse_latex. > > Aaron Meurer >

[sympy] validating dimensional consistency of expression

2020-05-27 Thread Ben
Hello, I have a string written in Latex for which I know the dimensions of each symbol. My goal is to validate the dimensional consistency of the expression. I'm having trouble with substitution. For example, >>> from sympy.physics.units import mass, length, time >>> from

Re: [sympy] Re: tests for parsing Latex input to Sympy

2020-05-26 Thread Ben
On Tuesday, May 26, 2020 at 7:23:42 AM UTC-4, David Bailey wrote: > > On 25/05/2020 23:42, Ben wrote: > > You're totally correct -- Latex is ambiguous. I don't find your >> observation discouraging since it is perfectly reasonable. >> > > The issue I'm interested

Re: [sympy] Re: tests for parsing Latex input to Sympy

2020-05-25 Thread Ben
> > > Hi Ben, > > I don't want to discourage you in any way, and I may be naive, but I'd > have thought LaTex would always be ambiguous one way or another - > particularly if it is hand written. I'd have thought the best solution in > the long term would be if peop

Re: [sympy] Re: tests for parsing Latex input to Sympy

2020-05-25 Thread Ben
My second realization was that it might be easier to remove the aspects of the Latex string that are related to presentation. Specifically in this case, replace a Latex string's "\ " with " " and replace "\," with " " before passing the string to Sympy. Kindly,

[sympy] Re: tests for parsing Latex input to Sympy

2020-05-24 Thread Ben
To answer my own question, I think I found the tests: https://github.com/sympy/sympy/blob/master/sympy/parsing/tests/test_latex.py https://github.com/sympy/sympy/blob/master/sympy/parsing/tests/test_sympy_parser.py On Sunday, May 24, 2020 at 3:01:09 AM UTC-4, Ben wrote: > > Hello, > &g

[sympy] tests for parsing Latex input to Sympy

2020-05-24 Thread Ben
ow where to create tests that would validate the changes. I'd like to be able to demonstrate that the changes are not breaking Sympy. Kindly, Ben -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop recei

Re: [sympy] Re: Preventing an expression from evaluating

2013-10-13 Thread Ben Lucato
in overriding flatten instead of __new__ there. Aaron Meurer On Fri, Oct 11, 2013 at 8:21 AM, Ben Lucato ben.luc...@gmail.com wrote: This is awesome!!! Your simple fix with overriding flatten() works perfectly. My last question is -- how do you do the same thing with Pow

Re: [sympy] Re: Preventing an expression from evaluating

2013-10-12 Thread Ben Lucato
2013 01:21, Ben Lucato ben.luc...@gmail.com wrote: This is awesome!!! Your simple fix with overriding flatten() works perfectly. My last question is -- how do you do the same thing with Pow? It is subclassed differently to Add, Mul (which both subclass AssocOp). I have taken a look at the source

Re: [sympy] Re: Preventing an expression from evaluating

2013-10-02 Thread Ben Lucato
not play nicely with potential subclasses. What is the exact code you are using for noevalAdd? Aaron Meurer On Oct 1, 2013, at 3:45 AM, Ben Lucato ben.luc...@gmail.com wrote: I have been doing some more work on this, and wanted to further include sympy.Add, sympy.Mul and sympy.Pow, however

[sympy] Re: Preventing an expression from evaluating

2013-10-01 Thread Ben Lucato
I have been doing some more work on this, and wanted to further include sympy.Add, sympy.Mul and sympy.Pow, however it doesn't work the same. For instance, doing noevalAdd(1, 2) returns 3, whereas sympy.Add(1, 2, evaluate=False) returns 1 + 2. Is there a way to do the same thing for these

Re: [sympy] Re: Preventing an expression from evaluating

2013-09-19 Thread Ben Lucato
for convenience (or always import it as from module import UnevaluatedExp as exp). The important thing is the __name__ of the class. Of course, we really should get rid of the class registry. But it hasn't been done yet. Aaron Meurer On Wed, Sep 18, 2013 at 11:51 PM, Ben Lucato ben.luc

Re: [sympy] Re: Preventing an expression from evaluating

2013-09-19 Thread Ben Lucato
work, there's a good chance that it too is a SymPy issue, not your issue. Aaron Meurer On Thu, Sep 19, 2013 at 5:12 PM, Ben Lucato ben.luc...@gmail.com wrote: Hey Aaron, you were spot on with your guess. Renaming the subclass to noevalexp solves the issue. You rock! On 20 September

[sympy] Re: Preventing an expression from evaluating

2013-09-18 Thread Ben Lucato
I know this is looking back a month or two, but I have just started to use your idea about subclassing. However, it is having unintended side effects. Including the code: class exp(sympy.exp): @classmethod def eval(cls, arg): return in a module like noevals.py, and then

Re: [sympy] Re: Contributing to SymPy

2013-08-01 Thread Ben Lucato
this on windows). On 1 August 2013 06:59, Ben Lucato ben.luc...@gmail.com wrote: For the newbie here (me) - how come this isn't reflected in the master branch yet? On 1 August 2013 14:00, Aaron Meurer asmeu...@gmail.com wrote: Yeah, I ended up uninstalling pyglet because of the bugs

[sympy] Contributing to SymPy

2013-07-31 Thread Ben Lucato
Hello, I've made a couple of posts here asking questions, but now I'd like to start contributing ^^. I've gone through the guide to contributing, how to document, etc. and done everything I need to. I've been writing Python for over a year now, but am very new to things like Git/GitHub. Two

Re: [sympy] Contributing to SymPy

2013-07-31 Thread Ben Lucato
Ok - I'm not at home at the moment, but when I get home I will re-run the tests and post the relevant output. On 1 August 2013 12:10, Ondřej Čertík ondrej.cer...@gmail.com wrote: Hi Ben! On Wed, Jul 31, 2013 at 7:20 PM, Ben Lucato ben.luc...@gmail.com wrote: Hello, I've made a couple

[sympy] Re: Contributing to SymPy

2013-07-31 Thread Ben Lucato
Hey I re-ran the tests. I wasn't sure how much of the output to grab (most of it was successful tests), so I have just copied all of the error output with a bit of the successful tests - it's attached to this post as a text post. On Thursday, 1 August 2013 11:20:53 UTC+10, Ben Lucato wrote

[sympy] Re: Contributing to SymPy

2013-07-31 Thread Ben Lucato
Oops I mean attached as a text file, not attached as a text post. -- You received this message because you are subscribed to the Google Groups sympy group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this

Re: [sympy] Re: Contributing to SymPy

2013-07-31 Thread Ben Lucato
we should using something else, preferably inside the IPython notebook, which is very actively developed. Ondrej On Wed, Jul 31, 2013 at 9:31 PM, Ben Lucato ben.luc...@gmail.com wrote: Hey I re-ran the tests. I wasn't sure how much of the output to grab (most of it was successful

Re: [sympy] Transformations on sets/intervals/unions

2013-07-30 Thread Ben Lucato
): return FiniteSet(map(f, set)) On Mon, Jul 29, 2013 at 9:37 PM, Ben Lucato ben.luc...@gmail.com wrote: Thanks - I updated to the git master and now the TransformationSet works. Is there some way to take this new TransformationSet object and rewrite it as a Union/Interval? i.e. get

[sympy] Re: Twitter account

2013-07-29 Thread Ben Lucato
Nice :- ) On Tuesday, 30 July 2013 07:50:58 UTC+10, Aaron Meurer wrote: I have some good news on the Twitter side of things. First, the account @SymbolicPython, which purported to be the official Twitter account for SymPy and which was hacked, has been suspended. Second, the account

[sympy] Transformations on sets/intervals/unions

2013-07-29 Thread Ben Lucato
Howdy, say I do: domain = Interval(-pi, 0, True, True) + Interval(0, pi/2, True, True) I could hope to do a transformation to dilate this domain by a factor 2 from the origin, like so: new_domain = domain.replace(lambda expr: expr.is_Real, lambda expr: 2*expr) OR: new_domain =

Re: [sympy] Transformations on sets/intervals/unions

2013-07-29 Thread Ben Lucato
⎞ ⎜0, ─⎟ ∪ (-π, 0) ⎝ 2⎠ In [4]: new_domain Out[4]: ⎧ ⎛ π⎞ ⎫ ⎨2⋅x | x ∊ ⎜0, ─⎟ ∪ (-π, 0)⎬ ⎩ ⎝ 2⎠ ⎭ In [5]: 3*pi/4 in new_domain Out[5]: True On Mon, Jul 29, 2013 at 7:24 PM, Ben Lucato ben.l...@gmail.comjavascript: wrote

[sympy] Preventing canonisation within sympy.exp

2013-07-26 Thread Ben Lucato
If I do: z = -log((-x/2 + 1).together())/2 I get -log((-x + 2)/2)/2 yet when doing: z = -exp((-x/2 + 1).together())/2 I get -exp(-x/2 + 1)/2 Is there any way to prevent the interior of the exp from de-togethering? Using evaluate=False inside the exp does not work. -- You received this

Re: [sympy] Representing domains in SymPy

2013-07-25 Thread Ben Lucato
Oh sick - intervals are exactly what I'm looking for. Thanks! On Thursday, 25 July 2013 22:39:36 UTC+10, Matthew wrote: Since it's for my own purposes I really could represent it with nested lists/tuples, using booleans to include a value or not: [[(-sympy.oo, False), (-1, True)], [(0,

Re: [sympy] Forcing square roots to collect

2013-07-24 Thread Ben Lucato
22, 2013 at 2:28 AM, Ben Lucato ben.l...@gmail.comjavascript: wrote: Say I have an expression like: y = sqrt(2) * sqrt(-x + 4)/2 and then we call powsimp(y), we get: sqrt(-2*x + 8)/2 is there a way to get sqrt((-x + 4) / 2), i.e. have the denominator

[sympy] Representing domains in SymPy

2013-07-24 Thread Ben Lucato
We can represent domains on paper quite easily - for instance we can write x 0, or alternatively x (epsilon symbol) R-, or even x (epsilon symbol) (-infinity, 0) I looked around but couldn't really find that - is there a canonical way to be writing domains in SymPy? -- You received this

Re: [sympy] Representing domains in SymPy

2013-07-24 Thread Ben Lucato
` and `integer`. - if you need something more general or more fancy, we may have it in some (possibly unfinished, mostly unused) form, but it goes deeper in SymPy so a more precise question will help us give you a more precise answer. On 24 July 2013 13:10, Ben Lucato ben.luc...@gmail.com

Re: [sympy] Representing domains in SymPy

2013-07-24 Thread Ben Lucato
give you a more precise answer. On 24 July 2013 13:10, Ben Lucato ben.luc...@gmail.com wrote: We can represent domains on paper quite easily - for instance we can write x 0, or alternatively x (epsilon symbol) R-, or even x (epsilon symbol) (-infinity, 0) I looked around but couldn't really

[sympy] Forcing square roots to collect

2013-07-22 Thread Ben Lucato
Say I have an expression like: y = sqrt(2) * sqrt(-x + 4)/2 and then we call powsimp(y), we get: sqrt(-2*x + 8)/2 is there a way to get sqrt((-x + 4) / 2), i.e. have the denominator of the fraction be checked too? I tried looking at the docs but there didn't seem to be a simplification for

[sympy] Writing log bases using the latex printer?

2013-06-28 Thread Ben Lucato
As the question states - is there any way to write log bases in latex, rather than just writing log? -- You received this message because you are subscribed to the Google Groups sympy group. To unsubscribe from this group and stop receiving emails from it, send an email to

[sympy] How to prevent canonisation of fractions

2013-06-16 Thread Ben Lucato
If I have code like so: x = sympy.Symbol('x') y = 1 / (x + 1)**2 it evaluates to y = (x + 1)**(-2) is there a way to prevent that happening and have it remain as 1 / (x + 1)**2. OR: alternatively, is there a way to retrieve 1 / (x + 1)**2 from the canonical form? I've looked at the

Re: [sympy] How to prevent canonisation of fractions

2013-06-16 Thread Ben Lucato
printer and override the _print_Pow method. Aaron Meurer On Sun, Jun 16, 2013 at 11:40 PM, Ben Lucato ben.l...@gmail.comjavascript: wrote: If I have code like so: x = sympy.Symbol('x') y = 1 / (x + 1)**2 it evaluates to y = (x + 1)**(-2) is there a way to prevent

[sympy] Preventing an expression from evaluating

2013-05-31 Thread Ben Lucato
So in my ever growing quest to work with sympy, I have expressions like: y = 2*(x*sin(x) - sin(x) + cos(x))/cos(x)**2 with x values like pi/6 How do I substitute x into y without having evaluate automatically happen. i.e. I would like to be able to do something like: y.xreplace({x: pi/6})

Re: [sympy] Preventing an expression from evaluating

2013-05-31 Thread Ben Lucato
) remains unchanged. Aaron Meurer On Fri, May 31, 2013 at 8:31 PM, Ben Lucato ben.l...@gmail.comjavascript: wrote: So in my ever growing quest to work with sympy, I have expressions like: y = 2*(x*sin(x) - sin(x) + cos(x))/cos(x)**2 with x values like pi/6 How do I

[sympy] Have 2 * log(2) written as log(4)

2013-05-02 Thread Ben Lucato
Not sure how to get this behavior in sympy - or even if it's possible. It doesn't just go for this particular example, I want to be able to do it for all such logs. Many thanks!!! Sympy rocks -- You received this message because you are subscribed to the Google Groups sympy group. To

Re: [sympy] Have 2 * log(2) written as log(4)

2013-05-02 Thread Ben Lucato
to work class mylog(log): @classmethod def eval(self, *args): if args[0].is_Number: return None return super(mylog, self).eval(*args) Aaron Meurer On Thu, May 2, 2013 at 9:25 PM, Ben Lucato ben.l...@gmail.comjavascript: wrote: Not sure how to get

Re: [sympy] Have 2 * log(2) written as log(4)

2013-05-02 Thread Ben Lucato
to work class mylog(log): @classmethod def eval(self, *args): if args[0].is_Number: return None return super(mylog, self).eval(*args) Aaron Meurer On Thu, May 2, 2013 at 9:25 PM, Ben Lucato ben.l...@gmail.comjavascript: wrote: Not sure how to get

Re: [sympy] Have 2 * log(2) written as log(4)

2013-05-02 Thread Ben Lucato
Your second suggestion is perfect as it is exactly what I am looking to do - many thanks! You guys are so on the ball :- ) On Friday, 3 May 2013 13:49:23 UTC+10, smichr wrote: logs automatically simplify perfect powers. To create a log that doesn't do this you can use evaluate=False:

Re: [sympy] GSOC 2013 Linear Algebra proposal

2013-04-08 Thread Ben Fishbein
I'm sure this could be added. I'll note it in my final proposal. On Monday, April 8, 2013 6:57:42 PM UTC-4, David Joyner wrote: I would like all this *and* I'd ike this to work over finite fields:-) On Mon, Apr 8, 2013 at 6:49 PM, Ben Fishbein fish...@gmail.comjavascript: wrote: Hello

[sympy] interpretting output involving a hypergeometric function

2013-04-01 Thread Ben Goodrich
to supply Mathematica with the assumption that z^2 1, and I am trying to understand the function, f, for any real z. (although I'm pretty sure it will be a piecewise function). The function should always output a real number, but Mathematica gives me a complex result if I assume z^2 1. Thanks, Ben

[sympy] Re: interpretting output involving a hypergeometric function

2013-04-01 Thread Ben Goodrich
On Monday, April 1, 2013 2:44:36 AM UTC-4, Ben Goodrich wrote: g = y * ((1-(z*y)**2)**(-2+K/2 + eta) * gamma(S(1)/2 * (-1+K)+eta))/(sqrt(pi) * gamma(-1+K/2+eta)) * (2 * (y**2)**eta (1-y**2)**(S(1)/2 * (-4+K)))/beta(S(1)/2+eta,-1+K/2) f = simplify(integrate(g, (y, 0, 1), meijerg=True

[sympy] Re: Best way to implement 'Span'

2013-03-10 Thread Ben Fishbein
I'll get in contact with him. I might just build a new object for them. On Friday, March 8, 2013 4:58:17 AM UTC-5, Ben Fishbein wrote: I want to add a few things to sympy's matrices class such as image and kernel of a matrix. Both of these are represented as the span of a set of vectors

[sympy] Best way to implement 'Span'

2013-03-08 Thread Ben Fishbein
I want to add a few things to sympy's matrices class such as image and kernel of a matrix. Both of these are represented as the span of a set of vectors. Spans will normally take the form of span(v1,v2,v3...,vx) where all vs are vectors of equal length. I'm not exactly sure how to represent

[sympy] Help, becoming involved in SymPy

2013-03-04 Thread Ben Fishbein
Hello, My name's Ben and I would like to become involved developing SymPy. However, I'm finding the situation confusing. I've spent a while becoming familiar with the code, but can't find an area where I can help. I've checked the issues page but because I am just beginning I found the page

Re: [sympy] Help, becoming involved in SymPy

2013-03-04 Thread Ben Fishbein
Exactly what I was looking for. Thanks you. On Monday, March 4, 2013 4:13:45 PM UTC-5, Mateusz Paprocki wrote: Hi, On 4 March 2013 12:10, Ben Fishbein fish...@gmail.com javascript: wrote: Hello, My name's Ben and I would like to become involved developing SymPy. However, I'm

[sympy] Finding what function is used in an expression

2013-01-16 Thread Ben Lucato
An expression like this returns like so: (2 * sin(3 * x) + 3).find(sympy.Function) sin(3 * x) how do I get the output sympy.sin instead? i.e. find just the function being used? I don't want to do (2 * sin(3 * x) + 3).has(sympy.sin) for each possible function, unless I have to. -- You

[sympy] Help with defining functions

2013-01-14 Thread Ben Lucato
Hi I have looked through the docs and other places online, but I haven't found an answer! Currently when working with functions I do this: from sympy import * f = Function('f') x = Symbol('x') f = 100 - 2 * x to evaluate f I have to do this: f.subs({x: 2}) 96 which is a pain. Is there some

Re: [sympy] Help with defining functions

2013-01-14 Thread Ben Lucato
Thanks for your response. Is there a way to do this whilst preserving other methods of functions. For example, so I can still do things like f.diff() -- You received this message because you are subscribed to the Google Groups sympy group. To view this discussion on the web visit

[sympy] Re: Help with defining functions

2013-01-14 Thread Ben Lucato
That's perfect and exactly what I was looking for with defining a function. I'm not in need with efficient code, I'm looking for the simple version. Thanks - and sympy fucking ROCKS. I love what you guys have created -- You received this message because you are subscribed to the Google Groups

[sympy] Solving simple trigonometric equations

2012-10-31 Thread Ben Lucato
Hi I am new to sympy and let me just say it is incredible what you guys have created. I have found your package extremely useful already. I am having an issue with solving simple trigonometric equations, for example: solve(sin(x) - S(1) / 2) returns just [pi / 6], not the first two solutions

Re: [sympy] Trigsimp using groebner bases

2012-04-21 Thread Ben Goodrich
(theta_13)**2)*cos(theta_12)**2 + sqrt(cos(theta_12)**2 + cos(theta_13)**2)*cos(theta_13)**2))/3) + sqrt(6))/6 trigsimp_groebner(myexpr) # above error Thanks, Ben -- You received this message because you are subscribed to the Google Groups sympy group. To view this discussion on the web visit

[sympy] Re: GSoC 2011 Proposal - Cythonizing SymPy

2011-04-05 Thread Ben M
of modules now? In my proposal at the moment, I have mentioned modules that could be optimised, and I have outlined a schedule to assess the priority of modules before I start work on them. Ben M On Apr 5, 6:06 pm, Brian Granger elliso...@gmail.com wrote: Ben, I think my main feedback is the same

[sympy] GSoC 2011 Proposal - Cythonizing SymPy

2011-04-04 Thread Ben M
Hi, I have updated my Google Summer of Code proposal on the wiki. https://github.com/sympy/sympy/wiki/GSoC-2011-Application-Ben-McDonald:-Optimising-SymPy-using-Cython Any comments, feedback or suggests are welcome. Ben M -- You received this message because you are subscribed to the Google

[sympy] Re: GSOC Introduction

2011-03-29 Thread Ben M
the issue. Ben M On Mar 28, 9:08 am, Aaron S. Meurer asmeu...@gmail.com wrote: Yes, the present use case is only for integers.  We do not really use floating point numbers (our numerical library, mpmath, has its own arbitrary precision floating point implementation). This can be expanded

[sympy] Re: GSOC Introduction

2011-03-27 Thread Ben M
its own way of representing rational numbers and will other modules only make use of ints? Thanks. Ben M On Mar 26, 3:22 pm, Ben M mcdonald@gmail.com wrote: Hi. I'm continuing to look at Cython. I've added a wiki page.https://github.com/sympy/sympy/wiki/Optimising-SymPy-using-Cython

[sympy] Re: GSOC Introduction

2011-03-25 Thread Ben M
Hi. I'm continuing to look at Cython. I've added a wiki page. https://github.com/sympy/sympy/wiki/Optimising-SymPy-using-CythonGSoC-Proposal,-Ben-McDonald Ben M On Mar 24, 1:10 pm, Aaron S. Meurer asmeu...@gmail.com wrote: Yes, maybe you could look at cythonizing the logic code (ilke

[sympy] problem with limit

2010-10-09 Thread Ben Goodrich
Hi, I didn't see this problem exactly when I searched through the Issues, but I wanted to check that it was not a known problem first. Thanks, Ben In [32]: c,n,r = symbols('cnr') In [33]: limit( (( 2*n*(n-r+1)/(n + r*(n-r+1)) )**c + (r-1)*( n*(n-r +2)/(n + r*(n-r+1)) )**c - n)/(n**c - n), n

[sympy] Re: problem with limit

2010-10-09 Thread Ben Goodrich
On Oct 9, 11:07 pm, Ben Goodrich goodrich@gmail.com wrote: I tried running the limit through Maple, and it couldn't do it (it just returned an unevaluated form), and Wolphram Alpha times out.  Any idea what the answer should be? I conjecture the limit is 1 for c in the (0,1

[sympy] Re: problem with limit

2010-10-09 Thread Ben Goodrich
On Oct 9, 11:07 pm, Ben Goodrich goodrich@gmail.com wrote: I'll open an Issue for it. Now issue 2073 http://code.google.com/p/sympy/issues/detail?id=2073 -- You received this message because you are subscribed to the Google Groups sympy group. To post to this group, send email to sy

[sympy] Editor for sympy

2010-05-15 Thread Ben
when I open a console for currently active editor, it doesn't. Any thoughts? Thanks, Ben -- 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

[sympy] Re: RAM, stack, and polynomial manipulation

2010-05-02 Thread Ben Goodrich
) 180 181 -- 182 C = [ a - b for a, b in zip(A, B) ] 183 184 if all([ c = 0 for c in C ]): TypeError: zip argument #2 must support iteration Thanks, Ben -- You received this message because you are subscribed to the Google Groups sympy group. To post to this group, send

[sympy] Re: RAM, stack, and polynomial manipulation

2010-05-02 Thread Ben Goodrich
Sorry. You had said that already, but it did not stick in my brain. -- Ben -- 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+unsubscr

[sympy] Re: RAM, stack, and polynomial manipulation

2010-04-19 Thread Ben Goodrich
): 2, (3, 0, 0): 1} In [51]: dict(FF) Out[51]: {(0, 0, 1): -1, (0, 2, 0): 2, (3, 0, 0): 1} Any ideas? Thanks, Ben -- 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

[sympy] Re: RAM, stack, and polynomial manipulation

2010-04-19 Thread Ben Goodrich
/ipython console in module() TypeError: list objects are unhashable Maybe you meant something slightly different? Or is it another Python 2.5 vs 2.6 thing? Thanks, Ben -- You received this message because you are subscribed to the Google Groups sympy group. To post to this group, send email to sy

[sympy] Re: RAM, stack, and polynomial manipulation

2010-04-19 Thread Ben Goodrich
instead.  You can probably fix it by doing dict([ (tuple(map(int, monom)), coeff) for monom, coeff in M[0,0] ]) (though I haven't tried it). Aaron Meurer On Apr 19, 2010, at 1:43 PM, Ben Goodrich wrote: Hi Mateusz, I think I understand but ... On Apr 19, 12:13 pm, Mateusz Paprocki

[sympy] Re: RAM, stack, and polynomial manipulation

2010-04-19 Thread Ben Goodrich
that expansion on my office machine, and now it was just a few minutes and less than half a GB of RAM. Mateusz's ideas are better than my original ideas for solving this problem, but I hope your 1766 branch gets merged into the next SymPy. Ben -- You received this message because you

[sympy] Re: RAM, stack, and polynomial manipulation

2010-04-18 Thread Ben Goodrich
Hi Chris, On Apr 18, 12:01 pm, smichr smi...@gmail.com wrote: Hi Ben, I tried the original expressions that you posted and this takes 9 minutes on my pretty modest machine with branch 1766 (on which I've reworked the expand quite a bit).  Try numer = (first*second - third**2).expand(mul=1

[sympy] Re: RAM, stack, and polynomial manipulation

2010-04-18 Thread Ben Goodrich
Hi Mateusz, On Apr 18, 2:06 pm, Ben Goodrich goodrich@gmail.com wrote: Mateusz's suggestions are working well for me, just ugly.  And it is still slow and RAM-hungry when you convert a big sdp polynomial back into basic SymPy form at the end, but maybe your work on expand / core will help

[sympy] Re: RAM, stack, and polynomial manipulation

2010-04-16 Thread Ben Goodrich
if there is anything I can do to mitigate them? Thanks, Ben -- 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+unsubscr...@googlegroups.com. For more options

[sympy] Re: RAM, stack, and polynomial manipulation

2010-04-16 Thread Ben Goodrich
. I will try my code with the polys9 branch and follow your suggestions. Ben -- 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+unsubscr

[sympy] Re: RAM, stack, and polynomial manipulation

2010-04-16 Thread Ben Goodrich
that SymPy made really convenient, but it is good to know that GiNaC is a viable option. Ben -- 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

[sympy] Re: RAM, stack, and polynomial manipulation

2010-04-16 Thread Ben Goodrich
from a list) Thanks, Ben -- 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+unsubscr...@googlegroups.com. For more options, visit this group

[sympy] Re: RAM, stack, and polynomial manipulation

2010-04-16 Thread Ben Goodrich
, i.e. everything through this works: fgh = basic_from_dict(dict(FGH), *gens) but I get PolynomialError(can't create a multivariate polynomial from a list) from test = quo(FGH, 1, *gens) and also if 1 is replaced with a polynomial generated from gens. Thanks, Ben -- You received this message

[sympy] Re: RAM, stack, and polynomial manipulation

2010-04-16 Thread Ben Goodrich
Hi Mateusz, On Apr 16, 6:43 pm, Mateusz Paprocki matt...@gmail.com wrote: This is all correct, because you are using top-level quo() function with FGH, which is a low-level polynomial representation. Ah, now I understand. Thanks. Ben -- You received this message because you are subscribed

[sympy] Re: RAM, stack, and polynomial manipulation

2010-04-09 Thread Ben Goodrich
utilizes quo(Poly(first, domain='QQ') * Poly(second, domain='QQ') - Poly(third, domain='QQ')**2, Poly(fourth, domain='QQ')) So far, that is only using a small amount of RAM, but it is still calculating. I will report back when it finishes or errors. Thanks, Ben -- You received this message

[sympy] Re: RAM, stack, and polynomial manipulation

2010-04-09 Thread Ben Goodrich
On Apr 9, 7:05 pm, Ondrej Certik ond...@certik.cz wrote: On Fri, Apr 9, 2010 at 1:07 PM, Ben Goodrich goodrich@gmail.com wrote: So far, that is only using a small amount of RAM, but it is still calculating. I will report back when it finishes or errors. Yep, report back. Ondrej Okay

[sympy] simplification to eliminate square roots

2010-03-21 Thread Ben Goodrich
signs. Can anyone get me started? Thanks, Ben -- 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+unsubscr...@googlegroups.com. For more options

[sympy] Re: simplification to eliminate square roots

2010-03-21 Thread Ben Goodrich
On Mar 21, 4:13 pm, Ben Goodrich goodrich@gmail.com wrote: 3) Square both the numerator and denominator to finally get (((1 - Sigma_12**2/(tau_11**2*tau_22**2)) * (Sigma_34/(tau_33*tau_44) - Sigma_13*Sigma_14/(tau_11**2*tau_33*tau_44)) - (Sigma_23/ (tau_22*tau_33) - Sigma_12*Sigma_13

[sympy] Cannot factor expression involving square root

2010-02-26 Thread Ben Goodrich
Is this a known issue? I see it on 0.7.0-git too. -- Ben Python 2.5.5 console for SymPy 0.6.6 These commands were executed: from __future__ import division from sympy import * x, y, z = symbols('xyz') k, m, n = symbols('kmn', integer=True) f, g, h = map(Function, 'fgh') Documentation can

[sympy] Symmetric Matrix Fails Symmetry Check

2010-02-02 Thread Ben Goodrich
₁₁ + Λ₁₀⋅Υ₀₁) Does anyone have a suggestion about how best to convince Sympy that Sigma is symmetric? Thanks, Ben -- 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

Re: introduce Matrix constructor with symbolic entries

2009-06-16 Thread Ben Goodrich
On Jun 16, 12:35 pm, Ondrej Certik ond...@certik.cz wrote: On Sun, Jun 14, 2009 at 1:24 PM, Benjamin Yes, use var(), resp. see how it is done in there. I however don't recommend this approach, as it is messy. Why not something like: In [2]: Matrix(2, 2, lambda i, j: Symbol(a_%d%d % (i,

[sympy] Question regarding nonsquare Jacobian

2009-06-08 Thread Ben Goodrich
the Jacobian is now easy: return Matrix(m, n, lambda j, i: self[j].diff(X[i])) Thank you, Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sympy group. To post to this group, send email to sympy

[sympy] Re: Question regarding nonsquare Jacobian

2009-06-08 Thread Ben Goodrich
Thank you. I will do that. -- Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sympy group. To post to this group, send email to sympy@googlegroups.com To unsubscribe from this group, send email to sympy+unsubscr

[sympy] Re: Question regarding nonsquare Jacobian

2009-06-08 Thread Ben Goodrich
On Jun 8, 8:08 pm, Ben Goodrich goodrich@gmail.com wrote: Thank you. I will do that. -- Ben This is now issue 1465 at http://code.google.com/p/sympy/issues/detail?id=1465 which has my patch. In my opinion, the previous behavior is inconsistent with the definition of a Jacobian, so I hope