How to fix up positional arguments error?

asked 3 years ago

Siz gravatar image

updated 3 years ago

slelievre gravatar image

On Jupyter

TypeError: norm() takes 1 positional argument but 3 were given

I have this code.

plot((norm(x, 0, 1), 0.0625*(3+x)^2), (x, -2, 2), ymin=0)

It works but as soon as I change it to

plot((norm(x, 0, 1), 0.0625*(3+x)^2), (x, -3, -1), ymin=0)

to improve accuracy, it stops working.

Preview: (hide)

Comments

Neither code works in a fresh SageMath session, because the built-in function norm takes only one positional argument. You should check where your own norm function is defined, and ensure that your definition is used in both cases.

rburing gravatar imagerburing ( 3 years ago )