-
-
Couldn't load subscription status.
- Fork 56
Explicit imports #646
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
Merged
Merged
Explicit imports #646
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
030f775
Explicit imports
ChrisRackauckas 23f5a67
Update faq.md
ChrisRackauckas 19713c4
Update code_optimization.md
ChrisRackauckas 1be70fb
Update large_systems.md
ChrisRackauckas 9794b52
Update Project.toml
ChrisRackauckas 6e65c17
Update make.jl
ChrisRackauckas db33ec9
Update Project.toml
ChrisRackauckas 1e0c7d5
Update make.jl
ChrisRackauckas 246f0b1
Update faq.md
ChrisRackauckas b7e8bbe
Update large_systems.md
ChrisRackauckas af7064f
Update faq.md
ChrisRackauckas c2b697a
Update faq.md
ChrisRackauckas c0cb859
Add SciPy page
ChrisRackauckas 6979276
Update faq.md
ChrisRackauckas 529aea8
Update docs/src/api/scipy.md
ChrisRackauckas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # SciPy | ||
|
|
||
| This is an extension for importing solvers from | ||
| [SciPy](https://scipy.org/) into the SciML | ||
| interface. Note that these solvers do not come by default, and thus one needs to install | ||
| the package before using these solvers: | ||
|
|
||
| ```julia | ||
| import Pkg | ||
| Pkg.add("NonlinearSolveSciPy") | ||
| import NonlinearSolveSciPy as NLSP | ||
| ``` | ||
|
|
||
| Note that using this package requires Python and SciPy to be available via PythonCall.jl. | ||
|
|
||
| ## Solver API | ||
|
|
||
| ```@docs | ||
| NonlinearSolveSciPy.SciPyLeastSquares | ||
| NonlinearSolveSciPy.SciPyRoot | ||
| NonlinearSolveSciPy.SciPyRootScalar | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -27,7 +27,7 @@ Note that you will have to restart Julia to disable the timer outputs once enabl | |||||||
| ## Example Usage | ||||||||
|
|
||||||||
| ```@example diagnostics_example | ||||||||
| using NonlinearSolve | ||||||||
| import NonlinearSolve as NLS | ||||||||
|
|
||||||||
| function nlfunc(resid, u0, p) | ||||||||
| resid[1] = u0[1] * u0[1] - p | ||||||||
|
|
@@ -36,23 +36,23 @@ function nlfunc(resid, u0, p) | |||||||
| nothing | ||||||||
| end | ||||||||
|
|
||||||||
| prob = NonlinearProblem(nlfunc, [1.0, 3.0, 5.0], 2.0) | ||||||||
| prob = NLS.NonlinearProblem(nlfunc, [1.0, 3.0, 5.0], 2.0) | ||||||||
|
|
||||||||
| solve(prob) | ||||||||
| NLS.solve(prob) | ||||||||
| ``` | ||||||||
|
|
||||||||
| This produced the output, but it is hard to diagnose what is going on. We can turn on | ||||||||
| the trace to see what is happening: | ||||||||
|
|
||||||||
| ```@example diagnostics_example | ||||||||
| solve(prob; show_trace = Val(true), trace_level = TraceAll(10)) | ||||||||
| NLS.solve(prob; show_trace = Val(true), trace_level = NLS.TraceAll(10)) | ||||||||
| nothing; # hide | ||||||||
| ``` | ||||||||
|
|
||||||||
| You can also store the trace in the solution object: | ||||||||
|
|
||||||||
| ```@example diagnostics_example | ||||||||
| sol = solve(prob; trace_level = TraceAll(), store_trace = Val(true)); | ||||||||
| sol = NLS.solve(prob; trace_level = NLS.TraceAll(), store_trace = Val(true)); | ||||||||
|
|
||||||||
| sol.trace | ||||||||
| ``` | ||||||||
|
|
@@ -62,16 +62,16 @@ to use the `init` and `solve!` API for this. The `TimerOutput` will be present i | |||||||
| `cache.timer`. However, note that for poly-algorithms this is currently not implemented. | ||||||||
|
|
||||||||
| ```@example diagnostics_example | ||||||||
| cache = init(prob, NewtonRaphson(); show_trace = Val(true)); | ||||||||
| solve!(cache) | ||||||||
| cache = NLS.init(prob, NLS.NewtonRaphson(); show_trace = Val(true)); | ||||||||
| NLS.solve!(cache) | ||||||||
| cache.timer | ||||||||
| ``` | ||||||||
|
|
||||||||
| Let's try for some other solver: | ||||||||
|
|
||||||||
| ```@example diagnostics_example | ||||||||
| cache = init(prob, DFSane(); show_trace = Val(true), trace_level = TraceMinimal(50)); | ||||||||
| solve!(cache) | ||||||||
| cache = NLS.init(prob, NLS.DFSane(); show_trace = Val(true), trace_level = NLS.TraceMinimal(50)); | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [JuliaFormatter] reported by reviewdog 🐶
Suggested change
|
||||||||
| NLS.solve!(cache) | ||||||||
| cache.timer | ||||||||
| ``` | ||||||||
|
|
||||||||
|
|
||||||||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶