__init__.py 508 B

1234567891011121314151617181920212223242526
  1. import os
  2. ref_dir = os.path.join(os.path.dirname(__file__))
  3. __all__ = sorted(f[:-3] for f in os.listdir(ref_dir) if f.endswith('.py') and
  4. not f.startswith('__'))
  5. for f in __all__:
  6. __import__(__name__ + '.' + f)
  7. del f, ref_dir
  8. __doc__ = """\
  9. Topical documentation
  10. =====================
  11. The following topics are available:
  12. %s
  13. You can view them by
  14. >>> help(np.doc.TOPIC) #doctest: +SKIP
  15. """ % '\n- '.join([''] + __all__)
  16. __all__.extend(['__doc__'])