Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use latexify for scipy.special.expit ? #63

Closed
Vector-Cross opened this issue Oct 24, 2022 · 3 comments
Closed

How to use latexify for scipy.special.expit ? #63

Vector-Cross opened this issue Oct 24, 2022 · 3 comments
Labels

Comments

@Vector-Cross
Copy link

Vector-Cross commented Oct 24, 2022

I want to latexify scipy.special.expit In jupyter lab.
What should I do?
image

import latexify
from scipy.special import expit

@latexify.with_latex
def f(x):
    return expit(x)

f
@odashi
Copy link
Collaborator

odashi commented Oct 24, 2022

@Vector-Cross Thanks for posting the issue.

We need more information about the expected behavior. I think this function could be expressed as different forms:

  • $\sigma(x)$
  • $\frac{1}{1 + \exp(-x)}$
  • $\mathrm{expit}(x)$

either choice would be correct according to the situation (i.e., someone wants a specific form, but someone doesn't want it)

@odashi odashi added the question Further information is requested label Oct 24, 2022
@Vector-Cross
Copy link
Author

Thanks for reply.
I wonder if there is a method that can be expressed in the second form.
Otherwise I have to redefinition sigmoid function by myself.

@odashi
Copy link
Collaborator

odashi commented Oct 25, 2022

@Vector-Cross Great. At this point we have no options to expand composite functions, but we could provide something (namely expand_functions boolean option). It may be useful for other functions, e.g., hypot atan2. Let me work on this later.

@odashi odashi added feature and removed question Further information is requested labels Oct 25, 2022
@odashi odashi added this to the v0.2 milestone Oct 25, 2022
@odashi odashi removed the feature label Oct 25, 2022
@odashi odashi removed this from the v0.2 milestone Oct 25, 2022
@odashi odashi added the feature label Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants