Ask Your Question
2

Sagemanifold - `only_nonredundant = True` by default

asked 2018-12-03 18:37:06 +0100

Dox gravatar image

Hi, I find the option only_nonredundant=True really helpful, but it is annoying to type over and over the option on the notebook. Is it possible to define the option globally (within a notebook)?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
3

answered 2018-12-03 19:05:20 +0100

rburing gravatar image

updated 2018-12-03 19:05:42 +0100

That would be nice to have as an option indeed. As a workaround, you could define something like

nrcomps = lambda t, **kwargs: t.display_comp(only_nonredundant=True, **kwargs)

so you can do nrcomps(Ric) but also pass extra arguments like nrcomps(Ric, only_nonzero=True).

edit flag offensive delete link more

Comments

Excellent! Thank you for the answer, and a wonderful use of the lambda function!

Dox gravatar imageDox ( 2018-12-03 19:18:05 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-12-03 18:37:06 +0100

Seen: 298 times

Last updated: Dec 03 '18