nctions. The current c code printer does not target any specialized C
> libraries (but that would be a nice addition!).
>
> Jason
> moorepants.info
> +01 530-601-9791 <(530)%20601-9791>
>
>
> On Sat, Mar 18, 2023 at 3:18 PM brombo wrote:
>
>> I have looked fu
I have looked further and while ccode(expr) can export functions like sin,
cox, exp it cannot export special functions such as bessel, elliptic, etc..
Is there a way to export special functions into c-code?
On Saturday, March 18, 2023 at 9:52:48 AM UTC-4 brombo wrote:
> Does the C c
Does the C code generator generate special function calls with the same
syntax that is used in the gsl (GNU Scientific Library). For example is
the sympy call besselj(nu,z) translated to J(nu,z) etc.?
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
Is the following correct? As long as the classes I write have _sympystr
and _latex members the printing using sympy and my objects is transparent.
One more question. I am running Ubuntu 22.04 and have not been able to set
a PYTHONPATH to include the directories with my code in them. Has
I have a sum of terms some of which are multiplied by cos(th). I want to
group these terms together (in parenthesis) and have the terms not
multiplied by cos(th). A complicating issue is that the sum is a numerator
in a fraction. Consider the following expression:
(A*cos(th)+B*cos(th)+C)/D
I understand how to create a custom latex printer for my classes using
_latex(). My question is there an acceptable way for me to create a custom
latex printer for sympy class objects? For example a custom latex printer
for sympy functions or derivatives that would override the sympy printer
I am developing an improved API for differentiation in sympy which is a
class for scalar differential operators (a linear combination of sympy
expressions and partial derivatives). The code (test_dop.py attached)
produces the following output -
[image: test_dop-1.jpg]
To run this code also
In my class I have _latex and _sympystr. Your latex() function uses my
_latex but str() does not use _sympystr I have to define __str__() in my
class to print correctly. How should I use _sympystr to return the correct
string.
def _sympystr(self,printer):
if self.order == 0:
"latex" function to access my _latex and get
the following error message:
File
"/home/brombo/.local/lib/python3.8/site-packages/sympy/printing/printer.py",
line 309, in _print
return getattr(expr, self.printmethod)(self, **kwargs)
TypeError: _latex() takes 1 positional argument b
I calculated an integral g when printed grives:
Piecewise((sin(w/2)/w - 2*cos(w/2)/w**2 + 4*sin(w/2)/w**3, Ne(w, 0)), (2/3,
True)) + 2*Piecewise((-sin(w/2)/(2*w) + cos(w/2)/w**2 + sin(w/2)/w**3 -
sin(3*w/2)/w**3, Ne(w, 0)), (1/6, True))
First, how can I extract from g (without cutting and
Attached is the output of the latest piecewise.py (I got convolution, latex
printing, and Asymptote ploting working)
On Monday, September 5, 2022 at 11:42:49 AM UTC-4 brombo wrote:
> Would this be of any interest to anyone (see and run attached). I have
> written a piecewise function
Would this be of any interest to anyone (see and run attached). I have
written a piecewise function class (not like the one already in sympy)
where the piecewise function is defined on an ordered numerical grid (see
attached). The class in not finished but I can calculate the convolved
Does sympy have the capability to optimally factor (minimum number of
numerical operations) a polynomial or better yet a multinomial for
numerical evaluation. The simple example for a polynomial would be
consider the polynomial -
y = a*x**3+b*x**2+c*x+d
then the optimal factorization
This is a subject that is more general than sympy but is relevant to sympy
and I don't know where else to ask this question. For plotting in sympy
and python for that matter we pretty much make do with mathplotlib. The
software package Asymptote
https://asymptote.sourceforge.io/
is much
After GSOC is over I have someone to help me reintegrate geometric
algebra/calculus
into sympy. The biggest problem is documentation (all of it is in
LaTeX). I know that sympy uses sphinx. Can one use nbsphinx so they
can launch tutorial notebooks directly from the documentation or is the
Is there a simple way to use sympy in google colab?
https://colab.research.google.com/notebooks/welcome.ipynb
--
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
Where are the instructions on how to document sympy code with sphinx?
--
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
Does the installed version of sympy use nbsphinx for documentation -
https://nbsphinx.readthedocs.io/en/0.4.2/
so that the documentation (sphinx) can launch a jupyter notebook? In
documenting my code I would like to use notebook as part of the
documentation.
--
You received this message
To start with I cannot give a simple example using only sympy. I have only
been able to generate this failure using my modules. Below is code and
output showing as simple an example as I can generate with some
diagnostics. If you could suggest any other diagnostics I would appreciate
it.
If you want to test a sympy expression to see if it is a real scalar
(combination real of numbers, functions, symbols, etc.) how would you do it?
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails
is_real = True
>
> Aaron Meurer
>
> On Sat, Sep 19, 2015 at 2:47 PM, brombo <abrom...@gmail.com >
> wrote:
> > Your method works for a function, but not the derivative of a function -
> >
> > x = Symbol('x',real=True)
> >
> > f = RealFun
suggestions?
On Saturday, September 19, 2015 at 12:58:53 PM UTC-4, brombo wrote:
>
> How do I define a real function of a real variable?
>
> X = symbols('x y z',real=True)
>
> f = Function('f',real=True)(*X)
>
> "real=True" in Function doesn't do anything.
>
How do I define a real function of a real variable?
X = symbols('x y z',real=True)
f = Function('f',real=True)(*X)
"real=True" in Function doesn't do anything.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop
Sypmy will be used in courses at AGACSE 2015 in Barcelona during July and
August (http://www-ma2.upc.edu/agacse2015/) with galgebra
(https://github.com/brombo/galgebra) during a course and laboratory session
given by Alan Macdonald
(http://www-ma2.upc.edu/agacse2015/summer-school.html). See
Is there a simple way of removing all absolute values from an expression.
For example if the expression is (Abs(sin(w))/cos(w)) + Abs(w) return
(sin(w)/cos(w)) + w.
--
You received this message because you are subscribed to the Google Groups
sympy group.
To unsubscribe from this group and
I have implemented a custom matrix printer with _print_MatrixBase(self,
expr). I am running jupyter notebook with the output of
_print_MatrixBase(self, expr) being given by -
def _print_MatrixBase(self, expr):
rows = expr.rows
cols = expr.cols
out_str = ' \\left [
Is there anyway to print a nicely latex formatted matrix in ipython
notebook? When I try I just get the test version printed out while the
latex formatting for the other objects I am printing works fine.
--
You received this message because you are subscribed to the Google Groups
sympy
If I have a sympy expression, g, that is a function of sympy symbols (say
x, y, z, and t) how can I determine that g is not dependent on any other
symbols. The context for this is that I wish to determine if I have a
metric tensor that tensor is a function only of x, y, z, and t and not a
28 matches
Mail list logo