scikit-sparse 0.4.13__tar.gz → 0.4.16__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. {scikit-sparse-0.4.13/scikit_sparse.egg-info → scikit_sparse-0.4.16}/PKG-INFO +2 -2
  2. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/pyproject.toml +9 -2
  3. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16/scikit_sparse.egg-info}/PKG-INFO +2 -2
  4. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/setup.py +26 -8
  5. scikit_sparse-0.4.16/sksparse/__init__.py +1 -0
  6. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/sksparse/cholmod.pyx +2 -2
  7. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/sksparse/test_cholmod.py +5 -1
  8. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/tests/test_cholmod.py +5 -1
  9. scikit-sparse-0.4.13/sksparse/__init__.py +0 -1
  10. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/LICENSE.txt +0 -0
  11. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/MANIFEST.in +0 -0
  12. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/README.md +0 -0
  13. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/scikit_sparse.egg-info/SOURCES.txt +0 -0
  14. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/scikit_sparse.egg-info/dependency_links.txt +0 -0
  15. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/scikit_sparse.egg-info/requires.txt +0 -0
  16. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/scikit_sparse.egg-info/top_level.txt +0 -0
  17. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/setup.cfg +0 -0
  18. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/sksparse/cholmod_backward_compatible.h +0 -0
  19. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/sksparse/test_data/illc1033.mtx.gz +0 -0
  20. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/sksparse/test_data/illc1033_rhs1.mtx.gz +0 -0
  21. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/sksparse/test_data/illc1850.mtx.gz +0 -0
  22. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/sksparse/test_data/illc1850_rhs1.mtx.gz +0 -0
  23. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/sksparse/test_data/well1033.mtx.gz +0 -0
  24. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/sksparse/test_data/well1033_rhs1.mtx.gz +0 -0
  25. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/sksparse/test_data/well1850.mtx.gz +0 -0
  26. {scikit-sparse-0.4.13 → scikit_sparse-0.4.16}/sksparse/test_data/well1850_rhs1.mtx.gz +0 -0
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scikit-sparse
3
- Version: 0.4.13
3
+ Version: 0.4.16
4
4
  Summary: Scikit sparse matrix package
5
5
  Home-page: https://github.com/scikit-sparse/scikit-sparse
6
6
  Maintainer: Aaron Johnson
7
- Maintainer-email: justin.ellis18@gmail.com
7
+ Maintainer-email: aaron9035@gmail.com
8
8
  License: BSD
9
9
  Classifier: Development Status :: 3 - Alpha
10
10
  Classifier: Environment :: Console
@@ -25,6 +25,13 @@ requires = [
25
25
  "setuptools>=40.8.0",
26
26
  "wheel",
27
27
  "Cython>=0.22",
28
- 'numpy>=1.13.3; python_version>="3.6"',
28
+ 'numpy>=1.13.3; python_version=="3.6"',
29
+ 'numpy>=1.14.5; python_version=="3.7"',
30
+ 'numpy>=1.17.3; python_version=="3.8"',
31
+ 'numpy>=2.0; python_version=="3.9"',
32
+ 'numpy>=2.0; python_version=="3.10"',
33
+ 'numpy>=2.0; python_version>="3.11"',
34
+ 'numpy>=2.0; python_version>="3.12"',
35
+ 'numpy>=2.0; python_version>="3.13"',
29
36
  ]
30
- build-backend = "setuptools.build_meta"
37
+ build-backend = "setuptools.build_meta"
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scikit-sparse
3
- Version: 0.4.13
3
+ Version: 0.4.16
4
4
  Summary: Scikit sparse matrix package
5
5
  Home-page: https://github.com/scikit-sparse/scikit-sparse
6
6
  Maintainer: Aaron Johnson
7
- Maintainer-email: justin.ellis18@gmail.com
7
+ Maintainer-email: aaron9035@gmail.com
8
8
  License: BSD
9
9
  Classifier: Development Status :: 3 - Alpha
10
10
  Classifier: Environment :: Console
@@ -22,6 +22,7 @@ decomposition. Further contributions are welcome!
22
22
  """
23
23
 
24
24
  import os
25
+ import subprocess
25
26
  import sys
26
27
 
27
28
  import numpy as np
@@ -32,22 +33,39 @@ DISTNAME = "scikit-sparse"
32
33
  DESCRIPTION = "Scikit sparse matrix package"
33
34
  LONG_DESCRIPTION = __doc__
34
35
  MAINTAINER = "Aaron Johnson"
35
- MAINTAINER_EMAIL = "justin.ellis18@gmail.com"
36
+ MAINTAINER_EMAIL = "aaron9035@gmail.com"
36
37
  URL = "https://github.com/scikit-sparse/scikit-sparse"
37
38
  LICENSE = "BSD"
38
39
 
39
-
40
40
  INCLUDE_DIRS = [
41
41
  np.get_include(),
42
42
  sys.prefix + "/include",
43
43
  # Debian's suitesparse-dev installs to
44
44
  "/usr/include/suitesparse",
45
- # Homebrew macos-latest installs to
46
- '/usr/local/opt/suite-sparse/include/suitesparse/',
47
- ]
48
- LIBRARY_DIRS = [# Homebrew macos-latest installs to
49
- '/usr/local/opt/suite-sparse/lib'
50
45
  ]
46
+ LIBRARY_DIRS = []
47
+
48
+ # check if suitesparse is installed via homebrew
49
+ homebrew_suitesparse_dir = (
50
+ subprocess.run(
51
+ "readlink -f $(brew --prefix suitesparse)",
52
+ shell=True,
53
+ stdout=subprocess.PIPE,
54
+ )
55
+ .stdout.decode()
56
+ .strip()
57
+ )
58
+ if homebrew_suitesparse_dir: # empty string if not found (because error is printed to stderr)
59
+ INCLUDE_DIRS.append(
60
+ # Include directory for homebrew-installed suitesparse
61
+ homebrew_suitesparse_dir
62
+ + "/include/suitesparse/",
63
+ )
64
+ LIBRARY_DIRS.append(
65
+ # Library directory for homebrew-installed suitesparse
66
+ homebrew_suitesparse_dir
67
+ + "/lib"
68
+ )
51
69
 
52
70
  user_include_dir = os.getenv("SUITESPARSE_INCLUDE_DIR")
53
71
  user_library_dir = os.getenv("SUITESPARSE_LIBRARY_DIR")
@@ -65,7 +83,7 @@ setup(
65
83
  "": ["test_data/*.mtx.gz"],
66
84
  },
67
85
  name=DISTNAME,
68
- version="0.4.13", # remember to update __init__.py
86
+ version="0.4.16", # remember to update __init__.py
69
87
  maintainer=MAINTAINER,
70
88
  maintainer_email=MAINTAINER_EMAIL,
71
89
  description=DESCRIPTION,
@@ -0,0 +1 @@
1
+ __version__ = "0.4.16"
@@ -403,12 +403,12 @@ cdef void _error_handler(
403
403
  warnings.warn(full_msg, CholmodWarning)
404
404
 
405
405
  def _check_for_csc(m):
406
- if not sparse.isspmatrix_csc(m) or (hasattr(sparse, "csc_array") and isinstance(m, sparse.csc_array)):
406
+ if not (sparse.issparse(m) and m.format == "csc"):
407
407
  warnings.warn("converting matrix of class %s to CSC format"
408
408
  % (m.__class__.__name__,),
409
409
  CholmodTypeConversionWarning)
410
410
  m = m.tocsc()
411
- assert sparse.isspmatrix_csc(m) or (hasattr(sparse, "csc_array") and isinstance(m, sparse.csc_array))
411
+ assert sparse.issparse(m) and m.format == "csc"
412
412
  return m
413
413
 
414
414
  cdef class Common:
@@ -71,6 +71,10 @@ def test_cholesky_smoke_test():
71
71
  s_csc = sparse.csc_matrix(np.eye(10)[:, :2])
72
72
  assert sparse.issparse(f(s_csc))
73
73
  assert_allclose(f(s_csc).todense(), s_csc.todense())
74
+ print("csc_array")
75
+ sa_csc = sparse.csc_array(s_csc)
76
+ assert sparse.issparse(f(sa_csc))
77
+ assert_allclose(f(sa_csc).todense(), sa_csc.todense())
74
78
  print("csr")
75
79
  s_csr = s_csc.tocsr()
76
80
  assert sparse.issparse(f(s_csr))
@@ -94,7 +98,7 @@ def complex_matrix():
94
98
 
95
99
  def factor_of(factor, matrix):
96
100
  return np.allclose(
97
- (factor.L() * factor.L().H).todense(), matrix.todense()[factor.P()[:, np.newaxis], factor.P()[np.newaxis, :]]
101
+ (factor.L() * factor.L().T.conjugate()).todense(), matrix.todense()[factor.P()[:, np.newaxis], factor.P()[np.newaxis, :]]
98
102
  )
99
103
 
100
104
 
@@ -71,6 +71,10 @@ def test_cholesky_smoke_test():
71
71
  s_csc = sparse.csc_matrix(np.eye(10)[:, :2])
72
72
  assert sparse.issparse(f(s_csc))
73
73
  assert_allclose(f(s_csc).todense(), s_csc.todense())
74
+ print("csc_array")
75
+ sa_csc = sparse.csc_array(s_csc)
76
+ assert sparse.issparse(f(sa_csc))
77
+ assert_allclose(f(sa_csc).todense(), sa_csc.todense())
74
78
  print("csr")
75
79
  s_csr = s_csc.tocsr()
76
80
  assert sparse.issparse(f(s_csr))
@@ -94,7 +98,7 @@ def complex_matrix():
94
98
 
95
99
  def factor_of(factor, matrix):
96
100
  return np.allclose(
97
- (factor.L() * factor.L().H).todense(), matrix.todense()[factor.P()[:, np.newaxis], factor.P()[np.newaxis, :]]
101
+ (factor.L() * factor.L().T.conjugate()).todense(), matrix.todense()[factor.P()[:, np.newaxis], factor.P()[np.newaxis, :]]
98
102
  )
99
103
 
100
104
 
@@ -1 +0,0 @@
1
- __version__ = "0.4.13"
File without changes
File without changes