sparsetools.py 716 B

123456789101112131415161718192021222324252627
  1. """
  2. sparsetools is not a public module in scipy.sparse, but this file is
  3. for backward compatibility if someone happens to use it.
  4. """
  5. from numpy import deprecate
  6. # This file shouldn't be imported by scipy --- Scipy code should use
  7. # internally scipy.sparse._sparsetools
  8. @deprecate(old_name="scipy.sparse.sparsetools",
  9. message=("scipy.sparse.sparsetools is a private module for scipy.sparse, "
  10. "and should not be used."))
  11. def _deprecated():
  12. pass
  13. del deprecate
  14. try:
  15. _deprecated()
  16. except DeprecationWarning as e:
  17. # don't fail import if DeprecationWarnings raise error -- works around
  18. # the situation with Numpy's test framework
  19. pass
  20. from ._sparsetools import *