home.social

#sympy — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #sympy, aggregated by home.social.

fetched live
  1. I made a little extension to my Python-based LaTeX math renderer so it can be used to draw equations and Sympy expressions directly in the terminal as sixel graphics. Install with `pip install sixelmath` and give it a try! (in a sixel-supported terminal, of course).

    Source: github.com/cdelker/sixelmath

    #sixel #python #sympy #TeXLaTeX #terminal #equations #ziamath #konsole

  2. I made a little extension to my Python-based LaTeX math renderer so it can be used to draw equations and Sympy expressions directly in the terminal as sixel graphics. Install with `pip install sixelmath` and give it a try! (in a sixel-supported terminal, of course).

    Source: github.com/cdelker/sixelmath

    #sixel #python #sympy #TeXLaTeX #terminal #equations #ziamath #konsole

  3. I don't know why I haven't used sympy before. I think I looked into it around 10 years ago, and I didn't appreciate the potential at the time. From playing around with it today, it's a capable symbolic math library. The documentation is rich as well. I really like it!
    sympy.org/en/index.html

    #sympy
    #python
    #symbolicMath

    1/n

  4. I don't know why I haven't used sympy before. I think I looked into it around 10 years ago, and I didn't appreciate the potential at the time. From playing around with it today, it's a capable symbolic math library. The documentation is rich as well. I really like it!
    sympy.org/en/index.html

    #sympy
    #python
    #symbolicMath

    1/n

  5. The hermite function f(x)=3x²-2x³ (basis of smoothstep) is a mix of the in and out easing of x²:

    >>> a,b,x = symbols('a b x', real=True)
    >>> mix = a*(1-x)+b*x
    >>> f_in = x**2
    >>> f_out = 1-f_in.subs({x:1-x})
    >>> f_in_out = mix.subs({a:f_in, b:f_out, x:x}).simplify()
    >>> f_out_in = mix.subs({a:f_out, b:f_in, x:x}).simplify()
    >>> hermite = 3*x**2-2*x**3
    >>> hermite.simplify() == f_in_out
    True

  6. The hermite function f(x)=3x²-2x³ (basis of smoothstep) is a mix of the in and out easing of x²:

    >>> a,b,x = symbols('a b x', real=True)
    >>> mix = a*(1-x)+b*x
    >>> f_in = x**2
    >>> f_out = 1-f_in.subs({x:1-x})
    >>> f_in_out = mix.subs({a:f_in, b:f_out, x:x}).simplify()
    >>> f_out_in = mix.subs({a:f_out, b:f_in, x:x}).simplify()
    >>> hermite = 3*x**2-2*x**3
    >>> hermite.simplify() == f_in_out
    True

    #sympy #math #animation

  7. I just went mental for an hour with because I declared two symbols like that: n,t=symbols('t n')

    I ended up with the most surprising identities ever...

  8. I just went mental for an hour with #sympy because I declared two symbols like that: n,t=symbols('t n')

    I ended up with the most surprising #math identities ever...

  9. CW: mild spoilers for Advent of Code 2023 Day 24

    Still writing my #AdventOfCode explainer #blog . To make it easier to explain the #algebra of one puzzle, I'm using #SymPy in as succinct and limited a way I can.

    #AdventOfCode2023 #programming #Python #code

  10. CW: mild spoilers for Advent of Code 2023 Day 24

    Still writing my #AdventOfCode explainer #blog . To make it easier to explain the #algebra of one puzzle, I'm using #SymPy in as succinct and limited a way I can.

    #AdventOfCode2023 #programming #Python #code

  11. @hisold Citing a plain website or GitHub repo is kinda unprofessional. Many widespead software packages have a publication that is well citable, e.g. has this one with a proper DOI: doi.org/10.7717/peerj-cs.103, same for , , , etc. Some have at least a entry (with a DOI) to be properly citable. apparently has none of those.

  12. @hisold Citing a plain website or GitHub repo is kinda unprofessional. Many widespead software packages have a publication that is well citable, e.g. #sympy has this one with a proper DOI: doi.org/10.7717/peerj-cs.103, same for #numpy, #scipy, #matplotlib, etc. Some have at least a #Zenodo entry (with a DOI) to be properly citable. #PlatformIO apparently has none of those.

  13. Earn money working on open source software ! New project just posted: help make wrappers to connect Symbolics.jl to SymPy. $300 bounty. Information for signing up for the small grants program are contained in the link:

    sciml.ai/small_grants/#create_

  14. Earn money working on open source software #oss! New project just posted: help make wrappers to connect Symbolics.jl to SymPy. $300 bounty. Information for signing up for the #SciML small grants program are contained in the link:

    sciml.ai/small_grants/#create_

    #julialang #python #symbolics #sympy #ode

  15. SymPy in Julia is actually awesome! It feels more ergonomic to use in Pluto notebook than the native Python package does in Jupyter, which is the opposite of what I expected.

    #Julia #JuliaLang #Pluto #math #SymPy

  16. SymPy in Julia is actually awesome! It feels more ergonomic to use in Pluto notebook than the native Python package does in Jupyter, which is the opposite of what I expected.

    #Julia #JuliaLang #Pluto #math #SymPy

  17. The interactive calculation sheet for #engineering, based on #emacs, #orgmode, #texlatex and #sympy is available in English [1], although the blog article is in German [2]. The template is also in English [3].

    #Orgmode is so impressive, you could use #maxima, #octave, #gnuplot, #graphviz and almost 40 other languages with all their libraries right out of the box [4].

    Have fun!

    [1] vennemann-online.de/flossblog/
    [2] vennemann-online.de/flossblog/
    [3] vennemann-online.de/flossblog/
    [4] orgmode.org/worg/org-contrib/b

  18. I like to do math, small prototypes and other experimenting with Python in Jupyter notebooks. NumPy, SciPy, SymPy and Matplotlib have been very handy.

    But recently Python was too slow for what I was doing and I had trouble juggling Numpy arrays like I often have (it is required for speed). I know some #Rust so I decided to give #evcxr a go because it has a Jupyter kernel. And omg, I wasn't disappointed! It was mindbogglingly fast compared to what I'm used to and it also made the hard part of my code way easier to get right.

    However, I only needed math functions provided by std this time. Now I'm trying to figure out if there are science Rust libs that are convenient enough to replace most Python in my notebooks. I know it's a fragmented space, but maybe one could already gather a comprehensive collection of crates manually.

    Any recommendations?

    #RustLang #SciPy #NumPy #SymPy #SciComp #Math

  19. I like to do math, small prototypes and other experimenting with Python in Jupyter notebooks. NumPy, SciPy, SymPy and Matplotlib have been very handy.

    But recently Python was too slow for what I was doing and I had trouble juggling Numpy arrays like I often have (it is required for speed). I know some #Rust so I decided to give #evcxr a go because it has a Jupyter kernel. And omg, I wasn't disappointed! It was mindbogglingly fast compared to what I'm used to and it also made the hard part of my code way easier to get right.

    However, I only needed math functions provided by std this time. Now I'm trying to figure out if there are science Rust libs that are convenient enough to replace most Python in my notebooks. I know it's a fragmented space, but maybe one could already gather a comprehensive collection of crates manually.

    Any recommendations?

    #RustLang #SciPy #NumPy #SymPy #SciComp #Math

  20. New #python #physics video - building a 3D animation of a half-atwood with a spring using #Lagrangian mechanics and #sympy (of course #vpython too)

    youtu.be/wB_hs-Dhs3c

  21. New #python #physics video - building a 3D animation of a half-atwood with a spring using #Lagrangian mechanics and #sympy (of course #vpython too)

    youtu.be/wB_hs-Dhs3c

  22. I recently read a paper by Kleshnina and others and used it to teach myself some evolutionary game theory techniques.

    This is a little obscure, so I'll thread below about why this topic matters for humans and the environment 🧵

    nadiah.org/2024/11/20/kleshnin

    #GameTheory #PrisonersDilemma #iteratedGame #cooperation #EvolutionOfCooperation #Z3 #pyeda #networkx #sympy #SageMath #sustainability

  23. I recently read a paper by Kleshnina and others and used it to teach myself some evolutionary game theory techniques.

    This is a little obscure, so I'll thread below about why this topic matters for humans and the environment 🧵

    nadiah.org/2024/11/20/kleshnin

    #GameTheory #PrisonersDilemma #iteratedGame #cooperation #EvolutionOfCooperation #Z3 #pyeda #networkx #sympy #SageMath #sustainability

  24. A math problem:

    Variables: a, b, c, d, e.
    Values: 2, 5, 13, 14, 15.
    Constraints:
    1. a is a multiple of b.
    2. d is a factor of a.
    3. e - b = c.
    Which variable holds which value?
    I can't find the solution.

    Today's math problem courtesy of a 12 year old upset with his "unsolvable" homework. I'm stumbled too.

    Can #sympy be wrangled to solve this sort of problems? Can't see where to limit the values each variable can take.

  25. A math problem:

    Variables: a, b, c, d, e.
    Values: 2, 5, 13, 14, 15.
    Constraints:
    1. a is a multiple of b.
    2. d is a factor of a.
    3. e - b = c.
    Which variable holds which value?
    I can't find the solution.

    Today's math problem courtesy of a 12 year old upset with his "unsolvable" homework. I'm stumbled too.

    Can #sympy be wrangled to solve this sort of problems? Can't see where to limit the values each variable can take.

  26. #Switch to #opensource solutions:

    Windows: #Linux
    Photoshop: #Gimp 3.0-rc
    Illustrator: #Inkscape
    PremierePro: #Kdenlive, #Shotcut
    Office/Acrobat: #OnlyOffice, #LibreOffice
    Maya: #Blender
    Media: #VLC
    Unity: #Godot
    ToonBoom: #SynfigStudio, #Pencil2D
    InDesign: #Scribus
    Nuke: #Natron
    Procreate: #Krita
    After Effects: #Friction
    Mathematica: #SageMath, #SymPy
    MatLab: #GnuOctave
    Audition: #Audacity
    Autocad: #FreeCAD, #QCad
    Ableton: #Ardour, #LMMS (daily build)
    Lightroom: #DarkTable, #RawTherapee

    #foss

  27. #Switch to #opensource solutions:

    Windows: #Linux
    Photoshop: #Gimp 3.0-rc
    Illustrator: #Inkscape
    PremierePro: #Kdenlive, #Shotcut
    Office/Acrobat: #OnlyOffice, #LibreOffice
    Maya: #Blender
    Media: #VLC
    Unity: #Godot
    ToonBoom: #SynfigStudio, #Pencil2D
    InDesign: #Scribus
    Nuke: #Natron
    Procreate: #Krita
    After Effects: #Friction
    Mathematica: #SageMath, #SymPy
    MatLab: #GnuOctave
    Audition: #Audacity
    Autocad: #FreeCAD, #QCad
    Ableton: #Ardour, #LMMS (daily build)
    Lightroom: #DarkTable, #RawTherapee

    #foss

  28. En esta entrada del blog revisamos como solucionar analíticamente y numéricamente la ecuación para el viento solar en ausencia de campo magnético, como muestra en el artículo original #Parker como primer soporte de su existencia. La solución analítica la hacemos con #SymPy, un paquete de álgebra computacional y para la parte numérica aplicamos el método de Runge Kutta orden 4 #Python

    #Astrodon #astronomía #sol

    cosmoscalibur.com/es/blog/2024

  29. En esta entrada del blog revisamos como solucionar analíticamente y numéricamente la ecuación para el viento solar en ausencia de campo magnético, como muestra en el artículo original #Parker como primer soporte de su existencia. La solución analítica la hacemos con #SymPy, un paquete de álgebra computacional y para la parte numérica aplicamos el método de Runge Kutta orden 4 #Python

    #Astrodon #astronomía #sol

    cosmoscalibur.com/es/blog/2024

  30. Esto se ve bonito. Preparando una entrada en el blog sobre la #EspiraldeParker #VientoSolar, aplicando la solución analítica con #SymPy. Ahora estoy revisando porque el caso numérico no me funciona en el tramo subsónico
    #Python #Matplotlib

  31. Esto se ve bonito. Preparando una entrada en el blog sobre la #EspiraldeParker #VientoSolar, aplicando la solución analítica con #SymPy. Ahora estoy revisando porque el caso numérico no me funciona en el tramo subsónico
    #Python #Matplotlib

  32. More irritating is that I realized afterwards that I needed $(2^{256})^{(2^{32}-1)} = 2^{1099511627520}$ anyway... I'd forgotten to subtract the one.

    And when you want such answers, as I should have remembered earlier, #Sympy (not the built in int class) is your friend.

  33. [New Blog Post] Gauss and Groebner Egraphs: Intrinsic Linear and Polynomial Equations philipzucker.com/linear_grobne #logic #egraph #sympy

  34. Scientific Python Lectures

    #Tutorials on the scientific #Python ecosystem: a quick introduction to central tools and techniques. The different chapters each correspond to a 1 to 2 hours course with increasing level of expertise, from beginner to expert.

    lectures.scientific-python.org

    #compsci #machinelearning #ComputerScience
    #NumPy #Matplotlib #SciPy #SymPy #Scikit_Learn

  35. Here is a #JOSS paper about the main reusable thing from my #PhD: the :python: Python package PARMESAN 🧀 for meteorological turbulence and timeseries analysis:

    doi.org/10.21105/joss.06127

    PARMESAN integrates with #pandas, uses #sympy-based equations and handles units with pint.

    I really like the approach of @joss: fully open infrastructure, automated workflows, everything feels really smooth. 👍

    #Python #meteorology #physics #turbulence

  36. Our article by @nobodyinperson on #PARMESAN our #Python package for meteorological turbulence and timeseries analysis has been published to @joss! 🥳

    doi.org/10.21105/joss.06127

    PARMESAN integrates with #pandas, uses #sympy-based equations and handles units with pint.

    #meteorology #physics #turbulence #fft #spectrum

  37. Until last week I supervised a weekly online lecture on :python: #Python for #engineering at @tudresden

    Now I am thinking on continuing this as a public Q&A format.

    Interested? → ⭐ this post.

    Apart from vanilla Python my main competence is #NumPy #SciPy #SymPy and #Matplotlib

    For those understanding German: I co-authored a for dummies book on the topic:

    python-fuer-ingenieure.de/