Support
Quality
Security
License
Reuse
kandi has reviewed handcalcs and discovered the below as its top functions. This is intended to give you an instant insight into handcalcs implemented functionality, and help decide if they suit your requirements.
Python library for converting Python calculations into rendered latex.
Basic Usage 1: As a Jupyter cell magic (
import handcalcs.render
QUESTION
A question for square root in Handcalcs plugin for juputer notebook
Asked 2020-Aug-26 at 00:09I have recently figured out a wonderful tool which renders equations in python to latex format. But there is a small problem that it always adds a bracket for square root which makes it look redundant. Here is a part of my code
#%%
import math
import handcalcs.render
pi = math.pi
g = 9.8
uk1 = 0.281
s1 = 10.615
d2 = 4.1579
#%%
%%render
#Long
# a2: acceleration from position 1 to before collision
a2 = -uk1*g
s2 = math.sqrt(s1**2+2*a2+d2)
And the result looks like this:
I wonder it there is any why to eliminate the brackets in the square root. Thx alot.
ANSWER
Answered 2020-Aug-26 at 00:09I am the author of handcalcs.
Currently, there is not a voluntary way of removing the brackets. They are there simply because when using the sqrt
function, there are brackets around the function's argument and they therefore appear in the rendered result. I agree, it would be nice to not have those outer brackets within the sqrt
sign. If you are willing, please post this as a feature request on the Github page. I can start looking into it.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
No vulnerabilities reported