Commit 46d0b127 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Add explicit methods

This adds methods to __dir__ so that plot_corner and other methods can
be tab completed (in ipython). Unfortunately, this is done by setting
these directly. While this isn't an ideal solution - there is no obvious
way to automate the process as methods to looks up all methods
themselves use the __dir__ attribute causing a recursion error.

Closes #111
parent ad4bf926
Pipeline #22780 passed with stages
in 13 minutes and 53 seconds
......@@ -76,7 +76,8 @@ class Result(dict):
See: http://ipython.org/ipython-doc/dev/config/integrating.html
"""
return self.keys()
methods = ['plot_corner', 'save_to_file', 'save_posterior_samples']
return self.keys() + methods
def __getattr__(self, name):
try:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment