1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
diff --git a/pysparse/__init__.py b/pysparse/__init__.py
index 6d09b00..ff39084 100644
--- a/pysparse/__init__.py
+++ b/pysparse/__init__.py
@@ -1,9 +1,42 @@
-"PySparse: A Fast Sparse Matrix Library for Python"
+"""
+PySparse: A Fast Sparse Matrix Library for Python
+=================================================
+
+Documentation is available in the docstrings and
+online at http://pysparse.sourceforge.net/.
+
+Contents
+--------
+Pysparse imports
+::
+ spmatrix --- sparse matrix types
+
+and, in addition, provides:
+
+Subpackages
+-----------
+Using any of these subpackages requires an explicit import. For example,
+``import pysparse.itsolvers``.
+
+::
+
+ itsolvers --- Iterative linear algebra solvers
+ precon --- Preconditioners
+ direct --- Direct solvers
+ direct.superlu --- Wrappers to SuperLU library
+ direct.umfpack --- Wrappers to UMFPACK library
+ eigen.jdsym --- Jacobi davidson eigenvalue solver for symmetric matrices
+
+Utility tools
+-------------
+::
+
+ __version__ --- pysparse version string
+"""
+
__docformat__ = 'restructuredtext'
-# Imports
-from numpy._import_tools import PackageLoader
try:
from version import version as __version__
except ImportError:
@@ -11,31 +44,6 @@ except ImportError:
__version__ = 'undefined'
from sparse import spmatrix
-#from sparse import *
-from misc import get_include
-
-pkgload = PackageLoader()
-pkgload(verbose=False,postpone=True)
-
-if __doc__:
- __doc__ += """
-
-Available subpackages
----------------------
-"""
-if __doc__:
- __doc__ += pkgload.get_pkgdocs()
-
-__all__ = filter(lambda s: not s.startswith('_'), dir())
-__all__ += '__version__'
-
-__doc__ += """
-
-Miscellaneous
--------------
-
- __version__ : pysparse version string
-"""
from pysparse.misc import Deprecated
@@ -47,3 +55,5 @@ class _superlu:
return self.factorizeFnc(*args, **kwargs)
superlu = _superlu()
+
+__all__ = ['spmatrix', 'superlu', '__version__']
|