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

A function call using a named argument generates an error #37776

Open
leejt144 opened this issue Apr 9, 2024 · 1 comment
Open

A function call using a named argument generates an error #37776

leejt144 opened this issue Apr 9, 2024 · 1 comment

Comments

@leejt144
Copy link

leejt144 commented Apr 9, 2024

Steps To Reproduce

I am trying to evaluate a definite integral whose upper limit is a variable. Here are the lines,

var('x')
var('x_')

assume(x,'real',x>0)
assume(x_,'real',x_>=0)

f(x) = integrate(1/sqrt(0.3*(1+x_)^3+0.7),x_,0,x)

And then I want to plot f as a function of x,

plot(f(x),(x,0.1,10))

Expected Behavior

I would have expected a 2D plot: x vs. f(x)

Actual Behavior

The plot() call produces the following error message,

verbose 0 (3897: plot.py, generate_plot_points) WARNING: When plotting, failed to evaluate function at 200 points.
verbose 0 (3897: plot.py, generate_plot_points) Last error message: 'Substitution using function-call syntax and unnamed arguments has been removed. You can use named arguments instead, like EXPR(x=..., y=...)'

@leejt144 leejt144 changed the title <title>A function call using a named argument generates an error A function call using a named argument generates an error Apr 10, 2024
@rburing
Copy link
Contributor

rburing commented Apr 12, 2024

Minimal example of the same bug:

y = 2*hypergeometric([], [], x)
plot(y, (x, 0.1, 1))

Without the multiplication 2* there is no error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants