Re: [sympy] Proof-of-concept: mathjax and graphviz side by side in Notebook

2022-12-12 Thread Björn Dahlgren
On Monday, 12 December 2022 at 14:12:11 UTC+1 Francesco Bonazzi wrote: > What about merging it as experimental API? In case you are not sure about > the state of the current code, we have a "*sandbox*" module in SymPy for > temporary experiments. > That's a nice idea, I had forgotten about

[sympy] Proof-of-concept: mathjax and graphviz side by side in Notebook

2022-12-11 Thread Björn Dahlgren
I often find myself wanting to look both at the tree representation and the latex rendering of an expression. Ideally I'd like to get both of them side by side. Here's a notebook I hacked together which is a start: https://gist.github.com/bjodah/581ca5d5c18dd34ff945134f5c6cecd7 I would also

[sympy] Re: 2019 GSoC students announced

2019-05-08 Thread Björn Dahlgren
On Monday, 6 May 2019 20:12:01 UTC+2, Aaron Meurer wrote: > > > Join me in congratulating these students on their acceptance. > > Congratulations everybody! And good luck to you and your projects! -- You received this message because you are subscribed to the Google Groups "sympy" group. To

[sympy] Re: Running SymPy's tests with pytest

2019-01-26 Thread Björn Dahlgren
Hi! On Tuesday, 22 January 2019 00:55:13 UTC+1, Oscar wrote: > For the past two months I've been working on making it possible to run > SymPy's test suite using pytest. It is now possible to do this so I > thought I'd write something here to explain how to use it and why it > can be useful.

[sympy] Re: Want information about projects of Vectors and vector spaces

2018-10-30 Thread Björn Dahlgren
On Tuesday, 30 October 2018 02:53:57 UTC+1, Ruchit Vithani wrote: > I looked at matrices folder in sympy. I didn't find any major stuff there. > So I think all this has not been implemented anytime. > Try: $ git grep -i gauss sympy/matrices/ $ git grep -i echelon sympy/matrices/ $ git

[sympy] Re: Introduction

2018-08-16 Thread Björn Dahlgren
On Wednesday, 15 August 2018 20:05:26 UTC+2, pranavgu...@gmail.com wrote: > > Hey guys , I am Pranav Guruprasad and have just joined the SymPy mailing > list.I sincerely want to contribute to this organization and have a decent > amount of expertise in python , C and C++.I am doing my

[sympy] Re: How to run the source code after making the changes on local system, using terminal

2018-06-20 Thread Björn Dahlgren
On Wednesday, 20 June 2018 15:10:05 UTC+2, shrivast...@gmail.com wrote: > > ... how do I run the (changed) python file, so that it implements the > changes I've made? > In the sympy repo root execute: $ ./bin/test sympy/functions/elementary/tests/test_piecewise.py that should tell you if your

[sympy] Re: How to find out whether someone is working on a particular issue or not

2018-06-19 Thread Björn Dahlgren
Hi, Usually it's fine just to start working on an issue, especially if there hasn't been any new activity for a while (say a week or so). To find e.g. the implementation of a function you can use ``git grep`` alternatively you can also use the search function on github. Best regards, Björn On

[sympy] Re: Introduction

2018-06-11 Thread Björn Dahlgren
sys> - pyneqsys <https://github.com/bjodah/pyneqsys> if nothing else they might serve as a reference / source of ideas. Best regards, Björn Dahlgren (@bjodah) On Thursday, 7 June 2018 01:07:24 UTC+2, Jared Lumpe wrote: > > Hi all, > > My name is Jared Lumpe and I am a PhD s

[sympy] Re: Announcing this year's GSoC students

2018-04-23 Thread Björn Dahlgren
Congratulations on being accepted. And good luck everyone! On Monday, 23 April 2018 18:23:24 UTC+2, Aaron Meurer wrote: > > Hi everyone. As many of you may have noticed, Google has announced the > results > for Google Summer of Code. I am proud to announce that seven students have > been

Re: [sympy] Any interest for SciPy 2018 talks and tutorials?

2018-01-25 Thread Björn Dahlgren
On Thursday, 25 January 2018 00:10:33 UTC+1, Aaron Meurer wrote: > > I like the codegen one too. Here's our proposal from last year > > https://github.com/sympy/sympy/wiki/SciPy-2017-Tutorial-Proposal:-Automatic-Code-Generation-with-SymPy. > > > We should be able to adjust the outline given

[sympy] How to fix bugs in Sympy initially?

2018-01-21 Thread Björn Dahlgren
Hi Abihinav, Start by reading this document: https://github.com/sympy/sympy/wiki/introduction-to-contributing Let us know if you think we can improve that document (clarifications etc.). Best regards, Björn -- You received this message because you are subscribed to the Google Groups "sympy"

[sympy] Re: fcode example in documentation not working?

2018-01-17 Thread Björn Dahlgren
Oh, yes. I agree, it looks as if the arithmetic is tripping up the routine which determines the bounds. For the contents in the issue: just a (minimal) self-contained failing example (like your last example), together with what you had expected to be the output (and a few words describing the

[sympy] Re: fcode example in documentation not working?

2018-01-17 Thread Björn Dahlgren
Sorry I don't quite follow. That example shows finite differences, hence ``i`` and ``i + 1``. -- 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] Re: fcode example in documentation not working?

2018-01-16 Thread Björn Dahlgren
On Tuesday, 16 January 2018 15:07:31 UTC+1, The Pauli Principle wrote: > > > I added the last line in accordance with the comments, this should yield a > version with for loops. > In this case it probably should (since there are bounds given on i). Can you open an issue for it on github?

[sympy] Re: Questions about third-party package distribution

2017-09-14 Thread Björn Dahlgren
Hello Robert, On Thursday, 14 September 2017 07:10:25 UTC+2, Robert Dodier wrote: > > Are Sympy packages mainly distributed via PyPI? > It is my understanding that packages which use SymPy (or are even meant to be used directly with SymPy expressions) are usually distributed over PyPI (and

[sympy] Re: Improvements to lambdify

2017-08-02 Thread Björn Dahlgren
That sounds really interesting. Have you published your code somewhere for us to look? Do you have separate module depending on SymPy, or have you modified the SymPy codebase? Don't worry too much about formating and style for now (you will get feedback on that during the review process

[sympy] Re: Vague question about functions of unknown arguments

2017-07-15 Thread Björn Dahlgren
On Friday, 14 July 2017 08:46:01 UTC+2, Jérôme Carretero wrote: > > Hi, > > ... > I was wondering if there is an existing way that I don't know of, > As far as I know you need to specify the arguments for Function. I think an AbstractFunction could be a nice addition. (I personally haven't had

[sympy] Re: SymPy 1.1 release candidate 1 ready for testing

2017-07-04 Thread Björn Dahlgren
On Monday, 3 July 2017 00:31:24 UTC+2, Aaron Meurer wrote: > > Please download it and test it, and report any issues you have with > it. If everything goes well, the final release should be released some > time this next week. > Great! I ran the test suites for the tuorial

[sympy] Re: Request for community input: removing versioned docs

2017-06-22 Thread Björn Dahlgren
On Thursday, 22 June 2017 21:38:28 UTC+2, Aaron Meurer wrote: > > I am looking for feedback on this, whether you think it's a good idea, > a bad idea, or any suggestions. > I am +1 on removing them. If that is too harsh: one could also keep a archive of old docs under e.g.

Re: [sympy] Re: GSoC Students announced

2017-05-12 Thread Björn Dahlgren
room called "codegen-gsoc17"? Björn Dahlgren -- 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

[sympy] GSoC 2017 proposal: Improved code generation facilities

2017-04-02 Thread Björn Dahlgren
For some reason my account on github.com just got "flagged" (has this happended to anyone else?), so the links in the proposal (which points to paths under https://github.com/bjodah/ are not accessible). I've contacted github, and I will put the files on mirrors if it isn't resolved shortly.

[sympy] GSoC 2017 proposal: Improved code generation facilities

2017-04-02 Thread Björn Dahlgren
Hi all, A bit a last minute call for feedback on my proposal before I submit it tomorrow: https://github.com/sympy/sympy/wiki/GSoC-2017-Application-Bj%C3%B6rn-Dahlgren:-Improved-code-generation-facilities Let me know what you think. Best regards, Björn -- You received this message because

[sympy] Re: Travis now has automatic build cancellation

2017-03-23 Thread Björn Dahlgren
Great news, it will surely help. -- 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 group, send email to

Re: [sympy] Integration of Plotly with Sympy

2017-02-24 Thread Björn Dahlgren
On Friday, 24 February 2017 17:38:53 UTC+1, Tony Hirst wrote: > > For 3D plots, I noticed a recent discussion around this in the *Teaching > with Jupyter* group in context of Mathbox. Example: > https://nbviewer.jupyter.org/github/znah/mathbox/blob/jupyter/examples/notebooks/mathbox.ipynb >

Re: [sympy] Integration of Plotly with Sympy

2017-02-24 Thread Björn Dahlgren
On Sunday, 19 February 2017 20:54:58 UTC+1, Aaron Meurer wrote: > > Does bokeh allow computations in the browser? > Yes, that's the beauty: http://bokeh.pydata.org/en/latest/docs/user_guide/interaction/callbacks.html#customjs-for-generic-events One could derive some expression for plotting in

Re: [sympy] Integration of Plotly with Sympy

2017-02-19 Thread Björn Dahlgren
On Monday, 13 February 2017 20:01:51 UTC+1, Aaron Meurer wrote: > > This is a useful idea, although it should perhaps be part of a larger gsoc > project to improve plotting. I think SymPy should also look at integrating > with mayavi (for 3D plots) and bokeh (for interactive plots). The >

Re: [sympy] Re: Derivative of Indexed by index: does it make sense?

2017-01-29 Thread Björn Dahlgren
On Thursday, 26 January 2017 20:40:10 UTC+1, Aaron Meurer wrote: > > I don't think it makes sense. The index is a discrete variable, but > derivatives only make sense for continuous variables. > > I agree with Aaron, I think making the Expr.is_constant method aware of Indexed would be the

[sympy] Re: Derivative of Indexed by index: does it make sense?

2017-01-26 Thread Björn Dahlgren
On Thursday, 26 January 2017 10:32:46 UTC+1, Francesco Bonazzi wrote: > > > But, does it make sense to derive an indexed symbol by the index? > > Do you have an applied example where this would help? If it simplifies users' code I think that would be an argument for it. -- You received this

[sympy] Re: Trouble solving nonlinear system of equations

2016-11-22 Thread Björn Dahlgren
On Tuesday, 22 November 2016 05:28:01 UTC+1, Denis Akhiyarov wrote: > > For numerical solution you may want to use scipy: > > https://groups.google.com/forum/m/#!topic/sympy/gIFados9AJo > Shameless plug: if you are solving a symbolically defined system numerically, you may want to try pyneqsys

[sympy] Re: Nice simplifcation and substitution of expressions in a large script

2016-11-16 Thread Björn Dahlgren
On Tuesday, 15 November 2016 13:50:24 UTC+1, Alexander Tille wrote: > > Hi guys, > > Hi, > > My first problem is also discussed here: > https://groups.google.com/forum/#!topic/sympy/ebGJLKeMODQ > > All Variables of the System (here X,Y,Z) should be >= 0. > If you look at the last steady

[sympy] Re: Solving set of linear equations in plaintext using sympy

2016-11-13 Thread Björn Dahlgren
r overall goal here? (ethanol density is not linear with respect to mass fraction water to start with..) Best regards, Björn Dahlgren -- 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,

[sympy] Re: Sympy and mpmath imported but still ImportError

2016-11-08 Thread Björn Dahlgren
On Tuesday, 8 November 2016 15:52:40 UTC+1, Alexander Tille wrote: Hi, > Traceback (most recent call last): > File "./algebraic_calculation_model_6_rescaled.py", line 4, in > import sympy.mpmath > /.../ > > Can you explain my mistake? > > If you change that line to "import mpmath"

[sympy] Re: Lambdify performance with repeated subexpressions

2016-10-14 Thread Björn Dahlgren
On Friday, 14 October 2016 15:09:46 UTC+2, Albert Pető wrote: > > Hi, I plan to heavily use a function generated with lambdify from a sympy > expression which has repeated occurences of some subexpressions. > This functionality is available in symengine:

[sympy] Re: import problem after adding one line to `sets.py`

2016-10-06 Thread Björn Dahlgren
On Thursday, 6 October 2016 16:09:05 UTC+2, Behrouz Babaki wrote: > > > This is the line that I added: > > from sympy.geometry.point import Point > > > Hi Behrouz, Sometimes you need to put the import statement in a function body to break to cyclic import, e.g. def foo(x): from bar.baz

[sympy] Re: Getting Started to contribute for GSoC 2017

2016-10-04 Thread Björn Dahlgren
On Tuesday, 4 October 2016 22:59:03 UTC+2, amoghmi...@gmail.com wrote: > > /.../ where can I begin to contribute. > Amogh, Check out this document to get started: https://github.com/sympy/sympy/wiki/introduction-to-contributing Björn -- You received this message because you are subscribed

[sympy] Re: Demo bugs

2016-09-26 Thread Björn Dahlgren
On Sunday, 25 September 2016 21:58:59 UTC+2, Lakshya Agrawal wrote: > > Hello i am a newbie and was wondering if their are any demo bugs(By Demo > bugs i mean bugs that are always open and analogous to practice problems > that many books have)for newbie to fix .Thank you > I would search pull

Re: [sympy] ConstantSymbol

2016-09-20 Thread Björn Dahlgren
Henry, did you get any further with this? I have often missed this kind of object, I usually keep track of the values of constants in a dictionary and perform xreplace before calling e.g. lambdify. But using a ConstantSymbol along the lines which you have described would make the code much

Re: [sympy] Re: Interested in contributing to Sympy, especially in the area of code generation

2016-07-14 Thread Björn Dahlgren
On Wednesday, 22 June 2016 13:26:14 UTC+2, Isuru Fernando wrote: > > I looked at the Kaleidoscope example and HowToUseJIT and implemented it > here, https://github.com/isuruf/symengine/tree/llvm. If anybody is > interested, you can take a look at and see if it can be improved. > Currently,

Re: [sympy] Optimize ordering of arguments in e.g. Add for LaTeX printing

2016-07-14 Thread Björn Dahlgren
On Thursday, 14 July 2016 11:07:28 UTC+2, Björn Dahlgren wrote: > > For reference (if anyone googles this): > > >>> latex((y-x)*(z-y), order='old') > '\\left(y - x\\right) \\left(z - y\\right)' > > That didn't work: >>> print(latex(f(x) - 1, order='old'))

Re: [sympy] Optimize ordering of arguments in e.g. Add for LaTeX printing

2016-07-14 Thread Björn Dahlgren
For reference (if anyone googles this): >>> latex((y-x)*(z-y), order='old') '\\left(y - x\\right) \\left(z - y\\right)' -- 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

Re: [sympy] Optimize ordering of arguments in e.g. Add for LaTeX printing

2016-07-08 Thread Björn Dahlgren
On Friday, 8 July 2016 23:26:32 UTC+2, Aaron Meurer wrote: > > I don't think the printing order and the args order are the same in > general. You should create a custom latex printer subclass with a custom > _print_Add. > Got it, thanks! -- You received this message because you are

Re: [sympy] Optimize ordering of arguments in e.g. Add for LaTeX printing

2016-07-08 Thread Björn Dahlgren
On Friday, 8 July 2016 21:53:38 UTC+2, Aaron Meurer wrote: > > Isn't just a question of picking a nonnegative term to go first? > Yes (I have some other ideas regarding optimizing the printed width of an equation too but let's skip that for now). But how would I go about doing so? the `.args`

[sympy] Optimize ordering of arguments in e.g. Add for LaTeX printing

2016-07-08 Thread Björn Dahlgren
Hi, The argument ordering of e.g. Add is lexiographical, and the printing follows the argument order: >>> (y-x)*(z-y) (-x + y)⋅(-y + z) is there already functionality to have the printing system reorder arguments to minimize number of signs printed? (I am generating LaTeX expressions and I'd

[sympy] Re: Interested in contributing to Sympy, especially in the area of code generation

2016-06-21 Thread Björn Dahlgren
On Monday, 20 June 2016 22:29:52 UTC+2, ruggero cyrille wrote: > > I'm interested in writing an LLVM IR backend similar to the C backend. > If you are well-versed in LLVM IR an interesting project would be to add JIT capabilities to SymEngine (the high-performance sister-project to SymPy), the

[sympy] Italics in math equations

2016-05-24 Thread Björn Dahlgren
I was recently made aware that only variables should be in italics in equations (see e.g. [1] , [2] , [3]

Re: [sympy] Feedback requested: The future of Python 2.7 support in SymPy

2016-05-22 Thread Björn Dahlgren
Hi Aaron, I think 2019 sounds reasonable, plenty of time for users (including me) to upgrade in my humble opinion. On Friday, 20 May 2016 22:51:45 UTC+2, Ondřej Čertík wrote: > > > For what is worth, I am still using Python 2.7 only. But I can > upgrade, I think most tools that I use support

[sympy] Re: as_finite_diff for complex PDE

2016-04-13 Thread Björn Dahlgren
On Tuesday, 12 April 2016 12:02:40 UTC+2, Mathias Louboutin wrote: > > > however as_finite_diff doesn't allow any cross derivatives (d/dxdy) even > so the documentation says it does (it only does if you define it and then > only take d/dx or d/dy) > > I opened an issue for this:

Re: [sympy] Demo jupyter notebooks with SymPy

2016-04-07 Thread Björn Dahlgren
On Sunday, 30 August 2015 23:00:43 UTC+2, Aaron Meurer wrote: > > That sounds like a good idea. Having them in a separate repo would make it > less of a big deal to include inline plots in the notebooks. > Yes, I have strong feelings against checking in any inline plots (or generated binary

[sympy] Re: SymPy 1.0 is released

2016-03-11 Thread Björn Dahlgren
On Wednesday, 9 March 2016 21:02:33 UTC+1, Aaron Meurer wrote: > > I'm proud the announce that SymPy version 1.0 has been released. > Thank you Aaron, and all contributors! I searched Zenodo for a DOI: https://zenodo.org/search?ln=en=sympy_search= Couldn't find SymPy 1.0. Once a DOI is

[sympy] Re: Regarding Code Generation with Sympy

2016-03-09 Thread Björn Dahlgren
On Wednesday, 9 March 2016 14:57:14 UTC+1, Tanu Hari Dixit wrote: > > > 2)The optimizer can implement the following with individual switches: > > > i)unrolled pow(x, n) > > ii)fused add multiply for floating point calculations > > iii)intelligent guess about whether to use exp2 > i, ii) any

[sympy] Design of sympy.Symbol

2016-01-26 Thread Björn Dahlgren
I was just surprised by the undocumented behaviour of Symbol: def __call__(self, *args): from .function import Function return Function(self.name)(*args) this is bad style in my humble opinion. The implicit creation of another type (Function) is confusing and very far from the zen of

Re: [sympy] sympy.min, sympy.max

2015-12-22 Thread Björn Dahlgren
On Tuesday, 22 December 2015 17:35:49 UTC+1, Aaron Meurer wrote: > > They already exist as Min and Max (the lowercase names are already taken > by Python and we don't override builtin names). It's actually more > complicated than what you suggest because they work on n arguments. Ah,

[sympy] sympy.min, sympy.max

2015-12-22 Thread Björn Dahlgren
Hi all, I found myself looking for sympy.min and sympy.max today, a solution is quite trivial: def min(a, b): return Piecewise((a, a < b), (b, True)) and max in analogy. Would it make sense to include those functions? Are they too simple? Have I overlooked some aspect? Best regards,

Re: [sympy] collecting common factors in a matrix

2015-12-01 Thread Björn Dahlgren
On Tuesday, 1 December 2015 15:52:56 UTC+1, Riccardo Rossi wrote: > > Dear Jason, > > i think i explained myself badly > > imagine i have > > a = Symbol('a') > a = sqrt(2)+1 > > the second statement "overwrites" the first, that's just how Python (and any other programming language that comes to

Re: [sympy] What is out there for SymPy code generation / optimizing compiler effort?

2015-11-03 Thread Björn Dahlgren
On Monday, 2 November 2015 21:46:56 UTC+1, Aaron Meurer wrote: > > > > On Mon, Nov 2, 2015 at 2:13 PM, Björn Dahlgren <bjo...@gmail.com > > wrote: > >> >> >> On Friday, 30 October 2015 22:33:19 UTC+1, Aaron Meurer wrote: >>> >>> I w

Re: [sympy] What is out there for SymPy code generation / optimizing compiler effort?

2015-11-03 Thread Björn Dahlgren
On Tuesday, 3 November 2015 16:46:39 UTC+1, Nathan Woods wrote: > > My use case for Sympy code generation is somewhat different from most, it > seems. I'm primarily interested in numerical quadrature on a grid, which > means a LOT of evaluations of similar functions. I'm only using lambdify >

Re: [sympy] What is out there for SymPy code generation / optimizing compiler effort?

2015-11-02 Thread Björn Dahlgren
On Friday, 30 October 2015 22:33:19 UTC+1, Aaron Meurer wrote: > > I would also love to hear from those of you who are using SymPy to do > code generation or would like to use SymPy to do code generation, what > is your wishlist for SymPy? What do you wish it could do that it can't > do or

[sympy] Re: Preparing for a 1.0 release

2015-10-25 Thread Björn Dahlgren
On Friday, 16 October 2015 22:19:50 UTC+2, Aaron Meurer wrote: > > As many of you know, I am starting a new research position at the > University of South Carolina with Anthony Scopatz's new research > group, ERGS. > That sounds exciting, I wish you the best of luck. That also got me thinking:

[sympy] Re: Installing Sympy on Raspberry Pi

2015-10-13 Thread Björn Dahlgren
On Tuesday, 13 October 2015 15:47:43 UTC+2, Dennis Christen wrote: > > Hi everyone > > I am now to programming on Raspberry Pi and I would like to solve > equations directly on the Raspberry Pi as part of a project I am currently > working on. However I am not quite sure if I have to install

[sympy] Re: Real Functions

2015-09-19 Thread Björn Dahlgren
On Saturday, 19 September 2015 20:47:08 UTC+2, brombo wrote: > > > Let me clarify. If I use the above to define f then > > re(f) returns re(f) not f and > im(f) returns im(f) not 0. > > > Here is a work around I've used: def RealFunction(*args, **kwargs): instance = Function(*args,

[sympy] Demo jupyter notebooks with SymPy

2015-08-30 Thread Björn Dahlgren
As you may know, the IPython guys are showcasing the new jupyter notebook here: https://try.jupyter.org/ They have a subfolder communities where they invite groups to publish example notebooks: https://github.com/jupyter/docker-demo-images I think it would be a nice addition to have a

[sympy] Re: generate code for Boolean expressions

2015-08-26 Thread Björn Dahlgren
On Monday, 24 August 2015 23:09:11 UTC+2, Nico wrote: Is there a better way/hack to support this kind of code generation? Not that I know of, we should teach codegen how to handle Boolean and Relational (and make it emit the apropriate boolean data type). -- You received this message

Re: [sympy] Re: Being more conscious of performance

2015-07-20 Thread Björn Dahlgren
On Monday, 20 July 2015 19:09:54 UTC+2, Aaron Meurer wrote: So apparently the new cache is way too slow. Can the size be increased to a point that makes the performance comparable to the old cache? One obviously has to balance the cache size against memory usage (which won't show up in

Re: [sympy] Re: Being more conscious of performance

2015-07-20 Thread Björn Dahlgren
On Monday, 20 July 2015 09:02:23 UTC+2, Jason Moore wrote: Yes, it seems that the new cache commit is the slow down in these tests. Running with fastcache installed seems to make a minor difference (~10-30%) http://hera.physchem.kth.se/~sympy_asv/ I haven't yet tried running tests with

[sympy] Re: Being more conscious of performance

2015-07-19 Thread Björn Dahlgren
Hi all, On Tuesday, 14 July 2015 02:49:57 UTC+2, Aaron Meurer wrote: - Get a benchmark machine and run airspeed velocity on it. We need to catch performance regressions. The benchmark suite can be anything, although obviously well-made benchmarks are better. I found a few hours and threw

[sympy] Re: code generation for array

2015-06-01 Thread Björn Dahlgren
On Monday, 1 June 2015 16:09:13 UTC+2, TIANJIAO SUN wrote: /.../ Can someone shed some light on why it is done this way? Thanks vm. I think it's mostly because people have been working with contiguous arrays (e.g. NumPy arrays). Even though multidimensional arrays in C offer great

Re: [sympy] Re: How about removing unused imports?

2015-01-08 Thread Björn Dahlgren
Also there can be false positives, because a function can be imported just so that it can be recursively imported from that same module. At best, you have to ignore __init__.py files. That's the stuff that gets re-exported up to the sympy module itself, so that it is available

[sympy] Re: algorithm used in sqrt function .

2014-12-20 Thread Björn Dahlgren
Hi, You will need to contribute to the code base before applying for GSoC, you may look at: https://github.com/sympy/sympy/wiki/introduction-to-contributing for further information. Good luck! Best, /Björn On Saturday, 20 December 2014 09:44:14 UTC+1, utpal kumar Jha wrote: The second part

Re: [sympy] Re: SymPy plans for the future: 1.0 on the horizon

2014-11-21 Thread Björn Dahlgren
On Friday, 21 November 2014 00:27:51 UTC+1, Aaron Meurer wrote: - Installation for end-users may not be much more difficult, but it does become more difficult for developers and potential developers. Instead of just working in the SymPy directory you have to teach people how to setup.py

[sympy] Re: SymPy 0.7.6 release candidate 2

2014-11-14 Thread Björn Dahlgren
Just running the test suite straight work just fine (as expected): $ cd sympy-0.7.6.rc2/ $ python setup.py test /.../ ALL EXAMPLES PASSED $ python --version Python 2.7.6 $ uname -a Linux hera 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15 01:58:42 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux $ cat

Re: [sympy] Refine away Piecewise using assumptions.

2014-10-25 Thread Björn Dahlgren
I looked for Q.is_false without luck, I also looked for an Inequality class but found nothing. Wouldn't that just be ~Q.is_true? It seems to work for me. The != class is called Unequality (to distinguish it from inequalities). Yes, you are absolutely right - I always thought ~

[sympy] Refine away Piecewise using assumptions.

2014-10-24 Thread Björn Dahlgren
Consider the following short example: http://nbviewer.ipython.org/urls/gist.githubusercontent.com/bjodah/720617780e83d7c35797/raw/c297ecf76a8e26a711b7c7868839f2dfb221bc10/gistfile1.txt refine with Q.is_true(...) works ok for refining away Piecewise from a solution (although it's a bit picky,

Re: [sympy] variable limit in ufuncify?

2014-09-26 Thread Björn Dahlgren
I think this does what you are looking for: https://github.com/bjodah/symvarsub/blob/master/symvarsub/numtransform/tests/test_numtransform.py -- You received this message because you are subscribed to the Google Groups sympy group. To unsubscribe from this group and stop receiving emails from

Re: [sympy] ufuncify now creates actual ufuncs

2014-09-03 Thread Björn Dahlgren
That being said, we do that in Theano. Putting a limit on the exponent that you do that would allow to don't loose too much precission for big exponent. Yes, that sounds like a good idea. Did you make any investigation on what is a suitable limit? I do like the specialized function

Re: [sympy] ufuncify now creates actual ufuncs

2014-09-03 Thread Björn Dahlgren
On Monday, 1 September 2014 22:37:31 UTC+2, James Crist wrote: /.../ Handling compiler options should definitely be added to the codewrappers though, but should be a separate issue. Yes, I even went so far to write my own package to handle compilaton (github.com/bjodah/pycompilation).

Re: [sympy] ufuncify now creates actual ufuncs

2014-08-30 Thread Björn Dahlgren
Cool! Great work! On Friday, 29 August 2014 22:48:23 UTC+2, James Crist wrote: If I understand correctly, there is no cost in representing pow(x, n) as x*x*x*x... for any positive integer n, as long as it's done correctly. Compilation will be slower for large n. C compilers don't like

Re: [sympy] PDB and tests

2014-07-11 Thread Björn Dahlgren
On Wednesday, 9 July 2014 05:53:30 UTC+2, Jason Moore wrote: I typically use `ipython --pdb` then import and run the specific test in the interpreter. I do something similar, but I prefer pudb (pip install pudb): $ PYTHONPATH=../../.. python -c from test_finite_diff import

[sympy] Re: How can I call sympy by javascript with django / jquery or ajax

2014-06-08 Thread Björn Dahlgren
. But like Sahil suggested: see if there is ssh support. Many thanks for your help! Peter Am Freitag, 6. Juni 2014 23:56:01 UTC+2 schrieb Björn Dahlgren: On Friday, 6 June 2014 23:18:19 UTC+2, Peter wrote: Hallo everybody, I'm sorry for this question, but I'm not realy familar with Python

[sympy] Re: Help Please

2014-06-08 Thread Björn Dahlgren
Hi Shreyas, I'm copy-pasting Aaron's reply from the other week: Take a look at https://github.com/sympy/sympy/issues?labels=Easy+to+Fixmilestone=page=1state=open and https://github.com/sympy/sympy/wiki/development-workflow and let us know if you have any questions. If you know python and

[sympy] Re: modify latex representation of user-defined function

2014-06-06 Thread Björn Dahlgren
On Friday, 6 June 2014 23:13:39 UTC+2, Andrei Berceanu wrote: I define a function gamma with the following code: from sympy import * x = Symbol('x') class gamma(Function): pass Its latex representation is print latex(gamma(x)) \Gamma\left(x\right) whereas I would like it to be

[sympy] Re: How can I call sympy by javascript with django / jquery or ajax

2014-06-06 Thread Björn Dahlgren
On Friday, 6 June 2014 23:18:19 UTC+2, Peter wrote: Hallo everybody, I'm sorry for this question, but I'm not realy familar with Python. Normally I'm working with PHP and JavaScript, but for my recent project I have to integrate some symbolic math to a webpage. In an Internet search, I

[sympy] Express Dervivative in terms of finite differences.

2014-04-07 Thread Björn Dahlgren
After reading Aaron's recommendation about looking for unanswered sympy questions at stackoverflow I stumbled upon: http://stackoverflow.com/questions/18701290/derivatives-discretization-with-sympy I implemented a solution for this and it is available as a WIP PR over here:

Re: [sympy] Express Dervivative in terms of finite differences.

2014-04-07 Thread Björn Dahlgren
April 2014 19:04:38 UTC+2, pr...@goodok.ru wrote: On 07.04.2014 19:34, Björn Dahlgren wrote: After reading Aaron's recommendation about looking for unanswered sympy questions at stackoverflow I stumbled upon: http://stackoverflow.com/questions/18701290/derivatives-discretization

Re: [sympy] Express Dervivative in terms of finite differences.

2014-04-07 Thread Björn Dahlgren
On Monday, 7 April 2014 19:25:59 UTC+2, Björn Dahlgren wrote: h is Symbol('h') (and given how sympy cache works - yes it is global). I was unsure whether I should use this or force the user to pass at least one parameter. Maybe I should let it default to 1 instead of Symbol('h')? I'm

[sympy] Re: Further refinement of IndexedBase and Idx

2014-04-04 Thread Björn Dahlgren
Björn, It is really cool that you are working on this, thanks for the PRs! I am not uptodate on the inner workings of SymPy any longer, but I will take a look at the patches and see if there is anything I can add. Øyvind On Wednesday, April 2, 2014 1:13:52 PM UTC+2, Björn Dahlgren wrote

[sympy] Further refinement of IndexedBase and Idx

2014-04-02 Thread Björn Dahlgren
Hi! Since I haven't opened any particular issues but only PR's I thought maybe I should announce them here so they won't go unnoticed. https://github.com/sympy/sympy/pulls/bjodah They are: - Avoid superfluous CSEs from Idx and IndexedBase instanceshttps://github.com/sympy/sympy/pull/7347

[sympy] Documentation of Geometric Algebra in Sympy 0.7.3

2014-03-27 Thread Björn Dahlgren
Looks like the links in the docs are broken in the galgebra module: http://docs.sympy.org/0.7.4.1/modules/galgebra/index.html which links to e.g. http://docs.sympy.org/0.7.4.1/modules/galgebra/GA.html changing to small letters: http://docs.sympy.org/0.7.4.1/modules/galgebra/ga.html solves

[sympy] Re: Documentation of Geometric Algebra in Sympy 0.7.3

2014-03-27 Thread Björn Dahlgren
Sorry! please disregard - didn't realize 0.7.5 had already been released! On Thursday, 27 March 2014 11:55:22 UTC+1, Björn Dahlgren wrote: Looks like the links in the docs are broken in the galgebra module: http://docs.sympy.org/0.7.4.1/modules/galgebra/index.html which links to e.g. http

Re: [sympy] Equivalence of function instances.

2014-01-29 Thread Björn Dahlgren
=False). If you don't mind actually digging into the metaclasses, a pull request would nice. Aaron Meurer On Tue, Jan 28, 2014 at 10:16 AM, Björn Dahlgren bjo...@gmail.comjavascript: wrote: Hello! I have an application where I use undefined functions as keys in dictionaries

[sympy] Equivalence of function instances.

2014-01-28 Thread Björn Dahlgren
Hello! I have an application where I use undefined functions as keys in dictionaries. This works great out of the box for sympy.Function However, I want to set real=True so I created a class factory which overrides _eval_is_real Now the trouble starts. I tried to work my way through the

[sympy] CSE of Indexed instances

2014-01-25 Thread Björn Dahlgren
Hi! while using the Indexed class from sympy.tensor I have run into the following problem: cse(...) fails for expressions having Indexed instances. They are not handled correctly in opt_cse() in cse_main.py A possible work-around is to substitute the Indexed instances with dummies, perform

Re: [sympy] CSE of Indexed instances

2014-01-25 Thread Björn Dahlgren
. Aaron Meurer On Sat, Jan 25, 2014 at 5:04 AM, Björn Dahlgren bjo...@gmail.comjavascript: wrote: Hi! while using the Indexed class from sympy.tensor I have run into the following problem: cse(...) fails for expressions having Indexed instances. They are not handled

Re: [sympy] CSE of Indexed instances

2014-01-25 Thread Björn Dahlgren
(and if there are exceptions for certain applications). So maybe passing modified exclude kwarg is a good workaround for now? Making it not look into the indices would be nice though. Aaron Meurer On Sat, Jan 25, 2014 at 12:45 PM, Björn Dahlgren bjo...@gmail.comjavascript: wrote: Ok, I poked around

Re: [sympy] CSE of Indexed instances

2014-01-25 Thread Björn Dahlgren
I started a PR for this: https://github.com/sympy/sympy/pull/2829 Any idea how to skip doing CSE of indices? On Saturday, 25 January 2014 20:05:32 UTC+1, Björn Dahlgren wrote: On Saturday, 25 January 2014 19:55:58 UTC+1, Aaron Meurer wrote: Well in theory it's easy. You just need to edit

Re: [sympy] CSE of Indexed instances

2014-01-25 Thread Björn Dahlgren
On Saturday, 25 January 2014 20:13:12 UTC+1, Aaron Meurer wrote: On Sat, Jan 25, 2014 at 1:05 PM, Björn Dahlgren bjo...@gmail.comjavascript: wrote: On Saturday, 25 January 2014 19:55:58 UTC+1, Aaron Meurer wrote: Well in theory it's easy. You just need to edit the exclude part

[sympy] Sorting of Mul arguments

2014-01-17 Thread Björn Dahlgren
As I am working on getting tests to pass for a workaround (https://github.com/sympy/sympy/pull/2780#issuecomment-32575929) I have run into the following problem: In [10]: a=sympy.Idx('a') In [11]: b=sympy.Symbol('b') In [12]: a*b Out[12]: b*a How would you go about to make

Re: [sympy] Codegen and looping over IndexedBase

2014-01-16 Thread Björn Dahlgren
On Saturday, 28 July 2012 21:45:20 UTC+2, Aaron Meurer wrote: On Fri, Jul 27, 2012 at 7:52 PM, Matthew Turk matth...@gmail.comjavascript: wrote: Hi Aaron, Thanks very much for the quick reply. I'm fairly new to sympy, and this is my first time looking at its internals. On

Re: [sympy] Codegen and looping over IndexedBase

2014-01-16 Thread Björn Dahlgren
On Thursday, 16 January 2014 14:24:41 UTC+1, Björn Dahlgren wrote: On Saturday, 28 July 2012 21:45:20 UTC+2, Aaron Meurer wrote: On Fri, Jul 27, 2012 at 7:52 PM, Matthew Turk matth...@gmail.com wrote: Hi Aaron, Thanks very much for the quick reply. I'm fairly new to sympy

Re: [sympy] CSymPy and mobile programming

2013-10-03 Thread Björn Dahlgren
On Thursday, 3 October 2013 18:40:26 UTC+1, F. B. wrote: On Thursday, October 3, 2013 9:50:05 AM UTC+2, Joachim Durchholz wrote: ... that's giving me a thought though: Maybe it's a good idea to make a Sympy-to-whatever-language translation. On Jython, a C++ library just doesn't make

  1   2   >