pytmpinv 1.1.2__tar.gz → 1.2.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytmpinv
3
- Version: 1.1.2
3
+ Version: 1.2.0
4
4
  Summary: Tabular Matrix Problems via Pseudoinverse Estimation
5
5
  Author-email: The Economist <29724411+econcz@users.noreply.github.com>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pytmpinv"
3
- version = "1.1.2"
3
+ version = "1.2.0"
4
4
  description = "Tabular Matrix Problems via Pseudoinverse Estimation"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytmpinv
3
- Version: 1.1.2
3
+ Version: 1.2.0
4
4
  Summary: Tabular Matrix Problems via Pseudoinverse Estimation
5
5
  Author-email: The Economist <29724411+econcz@users.noreply.github.com>
6
6
  License-Expression: MIT
@@ -1,4 +1,4 @@
1
- __version__ = "1.1.2"
1
+ __version__ = "1.2.0"
2
2
 
3
3
  from .tmpinv import tmpinv
4
4
 
@@ -154,8 +154,8 @@ def TMPinvSolve(
154
154
  p = b_col.shape[0]
155
155
  if S is not None:
156
156
  S = np.asarray(S, dtype=np.float64)
157
- if S.shape[0] != m + p:
158
- raise TMPinvInputError(f"S must have exactly {m + p} rows.")
157
+ if S.shape != (m + p, m + p):
158
+ raise TMPinvInputError(f"S must have shape {(m+p, m+p)}.")
159
159
  if (not np.all((S == -1) | (S == 0) | (S == 1)) or
160
160
  np.abs(S).sum(axis=0).max() > 1 or
161
161
  np.abs(S).sum(axis=1).max() > 1):
@@ -246,7 +246,7 @@ def TMPinvSolve(
246
246
  m_end = min(m_start + m_subset, m)
247
247
  p_start = col_block * p_subset
248
248
  p_end = min(p_start + p_subset, p)
249
- S_subset = np.ones(((m_end - m_start) + (p_end - p_start), 1))
249
+ S_subset = np.eye((m_end - m_start) + (p_end - p_start))
250
250
  b_subset = [b_row[m_start:m_end].reshape(-1, 1),
251
251
  b_col[p_start:p_end].reshape(-1, 1)]
252
252
  M_subset = None
File without changes
File without changes
File without changes