-
Notifications
You must be signed in to change notification settings - Fork 392
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
Support for SciPy integrate package #142
Comments
I guessed we can support the most simplest case, i.e., self-contained formulas:
into: If the first argument is a reference to another callable, we need additional treatment. E.g.,
It would be good if we get |
As for flake8 failures, is it happening in the current main? |
Yes, the failures are happening on the current main and I've pulled to verify that it is up to date. I'm getting E501 errors for lines being longer than 79 characters. Do you want to increase the maximum line length or just wrap the lines so they meet this requirement? |
Currently the length limit is set to 88: Line 75 in 7f13cb6
I think your runtime doesn't read pyproject.toml for some reason. Please check it. |
You're right, thanks for clarifying! I'll investigate why pyproject.toml isn't being read |
I also get the issue where |
|
Probably would add under It's also getting to the point where we have lots of "special treatments", so maybe it's time to make this into a config value? But I think it's important here to choose carefully the default values for this config value. It's important that for very commonly used functions, that the behavior is default to handle specially, but for functions like |
Yes I agreed that. I think this kind of feature should be provided as a plugin to avoid the confusion of the default behavior. One possible interface may be: import latexify
from latexify.plugins.scipy import integrate
@latexify.function(plugins=[integrate])
def f(x):
... Here This design may be useful for any other kind of extensions IMO (and also provides a way to implement third-party extensions). |
This is a great idea. Since there's probably multiple packages that define integration methods, this would solve trying to figure out which format it's in. Since we want this to support third-party extensions, it would mean that throughout the generation process, we need to check the integrations and let them hook into the process, right? Each integration would be fully self contained, and would need no additional code in the generation process to make them work. |
Let's go to the issue I created. |
Description
Adding support for the SciPy's integrate package would be useful. The quad, dblquad, and tplquad methods are used for single, double, and triple integrals respectively and they seem like a good starting point. You can read more about the methods here: https://docs.scipy.org/doc/scipy/tutorial/integrate.html. Not sure if there will need to be restrictions on these methods, but I appreciate any tips/suggestions for going about this.
Additional Flake8 Formatting Issue
I also ran the check.sh script before working on this feature and I noticed that the Flake8 formatting check was failing for long lines. Someone may have already fixed this but if they haven't, I can include the formatting corrections in with the SciPy work.
The text was updated successfully, but these errors were encountered: