From 7f121631e6406c17068e22461363dea597463414 Mon Sep 17 00:00:00 2001 From: Frederike Duembgen Date: Fri, 5 Jan 2024 18:52:59 -0500 Subject: [PATCH 1/9] Add function to plot squares corresponding to cliques --- poly_matrix/poly_matrix.py | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/poly_matrix/poly_matrix.py b/poly_matrix/poly_matrix.py index 18129e6..271490c 100644 --- a/poly_matrix/poly_matrix.py +++ b/poly_matrix/poly_matrix.py @@ -1,4 +1,5 @@ from copy import deepcopy +import itertools import matplotlib.pyplot as plt import numpy as np @@ -337,6 +338,7 @@ def get_variables(self, key=None): # TODO(FD): there is probably a much cleaner way of doing this -- basically, # keeping track of N somewhere else. For now, this is a quick hack. def get_max_index(self): + print("Warning: get_max_index is inefficient.") max_ = 0 for key in self.variable_dict.keys(): if isinstance(key, str): @@ -431,7 +433,8 @@ def get_matrix_dense(self, variables, verbose=False): :param variables: same as in self.get_matrix, but None is not allowed """ - assert variables is not None + if variables is None: + variables = self.get_variables() if isinstance(variables, list): variable_dict_i = self.generate_variable_dict_i(variables) variable_dict_j = self.generate_variable_dict_j(variables) @@ -465,6 +468,14 @@ def get_matrix_dense(self, variables, verbose=False): index_i += size_i return matrix + def get_start_indices(self, axis=0): + if axis in [0, "i"]: + return generate_indices(self.variable_dict_i) + elif axis in [1, "j"]: + return generate_indices(self.variable_dict_j) + else: + raise ValueError(f"Invalid axis {axis}") + def get_matrix_sparse(self, variables=None, output_type="coo", verbose=False): """Return a sparse matrix in desired format. @@ -722,6 +733,24 @@ def matshow( ) return fig, ax, im + def plot_box(self, ax, clique_keys, symmetric=True, **kwargs): + delta = 0.499 + indices = self.get_start_indices(axis=1) + for key_i, key_j in itertools.combinations_with_replacement(clique_keys, 2): + i1 = indices[key_i] - delta + i2 = i1 + self.variable_dict_j[key_i] + j1 = indices[key_j] - delta + j2 = j1 + self.variable_dict_j[key_j] + ax.plot([j1, j2], [i1, i1], **kwargs) + ax.plot([j1, j2], [i2, i2], **kwargs) + ax.plot([j1, j1], [i1, i2], **kwargs) + ax.plot([j2, j2], [i1, i2], **kwargs) + if symmetric: + ax.plot([i1, i2], [j1, j1], **kwargs) + ax.plot([i1, i2], [j2, j2], **kwargs) + ax.plot([i1, i1], [j1, j2], **kwargs) + ax.plot([i2, i2], [j1, j2], **kwargs) + def __repr__(self, variables=None, binary=False): """Called by the print() function""" if self.shape is None: From a04e08fdaa372231a3e0bd1466d8f7f3c619f087 Mon Sep 17 00:00:00 2001 From: Frederike Duembgen Date: Mon, 15 Jan 2024 17:58:51 -0500 Subject: [PATCH 2/9] Fix tests --- _test/test_ls.py | 6 ------ _test/test_poly_matrix.py | 15 ++------------- environment.yml | 20 ++++++++++++++++++++ poly_matrix/poly_matrix.py | 19 +++++++------------ 4 files changed, 29 insertions(+), 31 deletions(-) create mode 100644 environment.yml diff --git a/_test/test_ls.py b/_test/test_ls.py index d46a960..71c6e37 100644 --- a/_test/test_ls.py +++ b/_test/test_ls.py @@ -1,12 +1,6 @@ import itertools -import sys -from os.path import dirname import numpy as np -import pytest - -sys.path.append(dirname(__file__) + "/../") -print("appended:", sys.path[-1]) from poly_matrix.least_squares_problem import LeastSquaresProblem diff --git a/_test/test_poly_matrix.py b/_test/test_poly_matrix.py index da8b221..964ccbe 100644 --- a/_test/test_poly_matrix.py +++ b/_test/test_poly_matrix.py @@ -1,16 +1,10 @@ -import sys -from os.path import dirname - import numpy as np import pytest -sys.path.append(dirname(__file__) + "/../") -print("appended:", sys.path[-1]) - from poly_matrix import PolyMatrix, sorted_dict -def get_Ai(test=False): +def get_Ai(): """ Creates the following matrices: @@ -202,10 +196,6 @@ def test_Q(): get_Q(test=True) -def test_Ai(): - get_Ai(test=True) - - def test_operations_simple(): # mat1 = # 1 0 @@ -405,7 +395,7 @@ def test_scaling(): print("getting matrix...", end="") - mat.get_matrix(verbose=True) + mat.get_matrix() print("...done") @@ -464,7 +454,6 @@ def test_multiply(): test_get_empty() - test_Ai() test_Q() test_join_dicts() diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..4f3e676 --- /dev/null +++ b/environment.yml @@ -0,0 +1,20 @@ +name: poly_matrix +channels: + - defaults + - conda-forge + - anaconda + +dependencies: + - python=3.10 + - pip=22.3 + - flake8 + + - pandas>=1.5.3 + - numpy>=1.23.5 + - scipy>=1.9.3 + - pytest>=7.2.1 + - matplotlib>=3.6.2 + + - pip: + - -r requirements.txt + - -e . # build local package diff --git a/poly_matrix/poly_matrix.py b/poly_matrix/poly_matrix.py index dda2a97..5051e58 100644 --- a/poly_matrix/poly_matrix.py +++ b/poly_matrix/poly_matrix.py @@ -382,7 +382,7 @@ def get_nnz(self, variable_dict_i=None, variable_dict_j=None): # nnz += self.matrix[key_i][key_j].size # return nnz - def get_matrix(self, variables=None, output_type="csc", verbose=False): + def get_matrix(self, variables=None, output_type="csc"): """Get the submatrix defined by variables. :param variables: Can be any of the following: @@ -394,20 +394,18 @@ def get_matrix(self, variables=None, output_type="csc", verbose=False): assert output_type in self.MATRIX_OUTPUT_TYPES if output_type == "dense": - return self.get_matrix_dense(variables=variables, verbose=verbose) + return self.get_matrix_dense(variables=variables) elif output_type == "poly": - return self.get_matrix_poly(variables=variables, verbose=verbose) + return self.get_matrix_poly(variables=variables) elif output_type in self.SPARSE_OUTPUT_TYPES: - return self.get_matrix_sparse( - variables=variables, output_type=output_type, verbose=verbose - ) + return self.get_matrix_sparse(variables=variables, output_type=output_type) else: raise ValueError(output_type) def toarray(self, variables=None): return self.get_matrix_sparse(variables=variables).toarray() - def get_matrix_poly(self, variables, verbose=False): + def get_matrix_poly(self, variables): """Return a PolyMatrix submatrix. :param variables: same as in self.get_matrix, but None is not allowed @@ -440,7 +438,7 @@ def get_matrix_poly(self, variables, verbose=False): out_matrix.variable_dict_j = variable_dict_j return out_matrix - def get_matrix_dense(self, variables, verbose=False): + def get_matrix_dense(self, variables): """Return a small submatrix in dense format :param variables: same as in self.get_matrix, but None is not allowed @@ -488,7 +486,7 @@ def get_start_indices(self, axis=0): else: raise ValueError(f"Invalid axis {axis}") - def get_matrix_sparse(self, variables=None, output_type="coo", verbose=False): + def get_matrix_sparse(self, variables=None, output_type="coo"): """Return a sparse matrix in desired format. :param variables: same as in self.get_matrix, but None is not allowed @@ -556,9 +554,6 @@ def get_matrix_sparse(self, variables=None, output_type="coo", verbose=False): j_list = np.append(j_list, cols + indices_j[key_j]) data_list = np.append(data_list, values[rows, cols]) - if verbose: - print(f"Filling took {time.time() - t1:.2}s.") - shape = get_shape(variable_dict["i"], variable_dict["j"]) if output_type == "coo": From d9a4c5ddbe0fa2e09cea55e113b7283ca28e824e Mon Sep 17 00:00:00 2001 From: Frederike Duembgen Date: Wed, 17 Jan 2024 14:17:29 -0500 Subject: [PATCH 3/9] Remove redundant adjacency_i --- poly_matrix/poly_matrix.py | 76 +++++++++++++++----------------------- 1 file changed, 29 insertions(+), 47 deletions(-) diff --git a/poly_matrix/poly_matrix.py b/poly_matrix/poly_matrix.py index 5051e58..4089b87 100644 --- a/poly_matrix/poly_matrix.py +++ b/poly_matrix/poly_matrix.py @@ -1,5 +1,5 @@ -from copy import deepcopy import itertools +from copy import deepcopy import matplotlib.pyplot as plt import numpy as np @@ -106,11 +106,7 @@ def __init__(self, symmetric=True): self.variable_dict_i = {} self.variable_dict_j = {} - # TODO(FD) technically, adjacency_i has redundant information, since - # self.matrix.keys() could be used. Consider removing it (for now, - # it is kept for analogy with adjacency_j). # adjacency_j allows for fast starting of the adjacency variables of j. - self.adjacency_i = {} self.adjacency_j = {} self.shape = (0, 0) @@ -155,17 +151,14 @@ def init_from_sparse(A, var_dict, unfold=False): return self, new_var_dict return self, var_dict - def drop(self, variables_i): - for v in variables_i: + def drop(self, variables): + for v in variables: if v in self.matrix: self.matrix.pop(v) - if v in self.adjacency_i: - j_list = self.adjacency_i[v] - for j in j_list: - self.adjacency_j[j].remove(v) - self.adjacency_i.pop(v) if v in self.variable_dict_i: self.variable_dict_i.pop(v) + if v in self.variable_dict_j: + self.variable_dict_j.pop(v) def __getitem__(self, key): key_i, key_j = key @@ -206,13 +199,7 @@ def add_variable_j(self, key, size): self.last_var_j_index += size def add_key_pair(self, key_i, key_j): - if key_i in self.adjacency_i.keys(): - if not (key_j in self.adjacency_i[key_i]): - self.adjacency_i[key_i].append(key_j) - else: - self.adjacency_i[key_i] = [key_j] - - assert key_i not in self.matrix.keys() + if key_i not in self.matrix.keys(): self.matrix[key_i] = {} if key_j in self.adjacency_j.keys(): @@ -252,7 +239,7 @@ def __setitem__(self, key_pair, val, symmetric=None): # make sure the dimensions of new block are consistent with # previously inserted blocks. - if key_i in self.adjacency_i: + if key_i in self.matrix.keys(): assert ( val.shape[0] == self.variable_dict_i[key_i] ), f"mismatch in height of filled value for key_i {key_i}: got {val.shape[0]} but expected {self.variable_dict_i[key_i]}" @@ -317,7 +304,7 @@ def generate_variable_dict(self, variables=None, key="i"): def generate_variable_dict_i(self, variables=None): """Regenerate last_var_index using new ordering.""" if variables is None: - variables = list(self.adjacency_i.keys()) + variables = list(self.matrix.keys()) return self._generate_variable_dict(variables, self.variable_dict_i) def generate_variable_dict_j(self, variables=None): @@ -539,20 +526,19 @@ def get_matrix_sparse(self, variables=None, output_type="coo"): data_list = [] # Loop through blocks of stored matrices - for key_i in self.matrix: - for key_j in self.matrix[key_i]: + for key_i in variable_dict["i"]: + for key_j in set(self.matrix[key_i]).intersection(variable_dict["j"]): # Check if blocks appear in variable dictionary - if key_i in variable_dict["i"] and key_j in variable_dict["j"]: - values = self.matrix[key_i][key_j] - assert values.shape == ( - variable_dict["i"][key_i], - variable_dict["j"][key_j], - ), f"Variable size does not match input matrix size, variables: {(variable_dict['i'][key_i], variable_dict['j'][key_j])}, matrix: {values.shape}" - # generate list of indices for sparse mat input - rows, cols = np.nonzero(values) - i_list = np.append(i_list, rows + indices_i[key_i]) - j_list = np.append(j_list, cols + indices_j[key_j]) - data_list = np.append(data_list, values[rows, cols]) + values = self.matrix[key_i][key_j] + assert values.shape == ( + variable_dict["i"][key_i], + variable_dict["j"][key_j], + ), f"Variable size does not match input matrix size, variables: {(variable_dict['i'][key_i], variable_dict['j'][key_j])}, matrix: {values.shape}" + # generate list of indices for sparse mat input + rows, cols = np.nonzero(values) + i_list += list(rows + indices_i[key_i]) + j_list += list(cols + indices_j[key_j]) + data_list += list(values[rows, cols]) shape = get_shape(variable_dict["i"], variable_dict["j"]) @@ -810,8 +796,8 @@ def __add__(self, other, inplace=False): "Both matrices must be symmetric or non-symmetric to add." ) # Loop through second matrix elements - for key_i in other.adjacency_i: - for key_j in other.adjacency_i[key_i]: + for key_i in other.matrix: + for key_j in other.matrix[key_i]: # Check if element exists in first matrix if key_i in res.matrix and key_j in res.matrix[key_i]: # Check shapes of matrices to be added @@ -833,8 +819,8 @@ def __add__(self, other, inplace=False): ) else: # simply add constant to all non-zero elements - for key_i in res.adjacency_i.keys(): - for key_j in res.adjacency_i[key_i]: + for key_i in res.matrix: + for key_j in res.matrix[key_i]: if other[key_i, key_j] is not None: res.matrix[key_i][key_j] += other return res @@ -857,8 +843,8 @@ def __mul__(self, scalar, inplace=False): res = self else: res = self.copy() - for key_i in res.adjacency_i.keys(): - for key_j in res.adjacency_i[key_i]: + for key_i in res.matrix: + for key_j in res.matrix[key_i]: res.matrix[key_i][key_j] *= scalar return res @@ -866,7 +852,7 @@ def transpose(self): res = deepcopy(self) matrix_tmp = {} - for key_i, key_j_list in res.adjacency_i.items(): + for key_i, key_j_list in res.matrix.items(): for key_j in key_j_list: if key_j in matrix_tmp.keys(): matrix_tmp[key_j][key_i] = res.matrix[key_i][key_j].T @@ -874,10 +860,6 @@ def transpose(self): matrix_tmp[key_j] = {key_i: res.matrix[key_i][key_j].T} res.matrix = matrix_tmp - tmp = deepcopy(res.adjacency_i) - res.adjacency_i = res.adjacency_j - res.adjacency_j = tmp - tmp = deepcopy(res.variable_dict_i) res.variable_dict_i = res.variable_dict_j res.variable_dict_j = tmp @@ -894,11 +876,11 @@ def multiply(self, other_mat): """ output_mat = PolyMatrix(symmetric=False) - rows = self.adjacency_i.keys() + rows = self.matrix.keys() cols = other_mat.adjacency_j.keys() for key_i in rows: for key_j in cols: - common_elements = set(self.adjacency_i[key_i]).intersection( + common_elements = set(self.matrix[key_i].keys()).intersection( other_mat.adjacency_j[key_j] ) for key_mul in common_elements: From 0e27ac6b5c4f8189170d60e24b43ad881558dabc Mon Sep 17 00:00:00 2001 From: Frederike Duembgen Date: Sat, 20 Jan 2024 21:30:02 -0500 Subject: [PATCH 4/9] Fix tests --- .github/workflows/python-app.yml | 1 + _test/test_poly_matrix.py | 11 +++++------ poly_matrix/poly_matrix.py | 18 ++++++++++++++---- requirements.txt | 2 +- setup.cfg | 2 +- 5 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 7f453c0..c3fba33 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -36,4 +36,5 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | + pip install -e . pytest diff --git a/_test/test_poly_matrix.py b/_test/test_poly_matrix.py index 964ccbe..bd84c07 100644 --- a/_test/test_poly_matrix.py +++ b/_test/test_poly_matrix.py @@ -440,13 +440,12 @@ def test_multiply(): AT = A.transpose() S = A.multiply(B.multiply(AT)) - np.testing.assert_allclose( - S["x1", "x1"], np.c_[np.r_[3 * 7 * 7, 3 * 7 * 8], np.r_[3 * 7 * 8, 3 * 8 * 8]] - ) - np.testing.assert_allclose( - S["x2", "x2"], - np.c_[np.r_[2 * 9 * 9, 2 * 9 * 10], np.r_[2 * 9 * 10, 2 * 10 * 10]], + S_test = ( + A.get_matrix_dense((["x1", "x2"], ["z1", "z2"])) + @ B.get_matrix_dense(["z1", "z2"]) + @ AT.get_matrix_dense((["z1", "z2"], ["x1", "x2"])) ) + np.testing.assert_allclose(S.get_matrix_dense(["x1", "x2"]), S_test) if __name__ == "__main__": diff --git a/poly_matrix/poly_matrix.py b/poly_matrix/poly_matrix.py index 4089b87..54d1bcf 100644 --- a/poly_matrix/poly_matrix.py +++ b/poly_matrix/poly_matrix.py @@ -317,7 +317,9 @@ def _generate_variable_dict(self, variables, variable_dict): if isinstance(variables, dict): return {key: variable_dict.get(key, variables[key]) for key in variables} else: - return {key: variable_dict[key] for key in variables} + return { + key: variable_dict[key] for key in variables if key in variable_dict + } def get_variables(self, key=None): """Return variable names starting with key. @@ -425,7 +427,7 @@ def get_matrix_poly(self, variables): out_matrix.variable_dict_j = variable_dict_j return out_matrix - def get_matrix_dense(self, variables): + def get_matrix_dense(self, variables=None): """Return a small submatrix in dense format :param variables: same as in self.get_matrix, but None is not allowed @@ -527,9 +529,12 @@ def get_matrix_sparse(self, variables=None, output_type="coo"): # Loop through blocks of stored matrices for key_i in variable_dict["i"]: - for key_j in set(self.matrix[key_i]).intersection(variable_dict["j"]): + for key_j in variable_dict["j"]: + try: + values = self.matrix[key_i][key_j] + except KeyError: + continue # Check if blocks appear in variable dictionary - values = self.matrix[key_i][key_j] assert values.shape == ( variable_dict["i"][key_i], variable_dict["j"][key_j], @@ -851,6 +856,7 @@ def __mul__(self, scalar, inplace=False): def transpose(self): res = deepcopy(self) + res.adjacency_j = {} matrix_tmp = {} for key_i, key_j_list in res.matrix.items(): for key_j in key_j_list: @@ -858,6 +864,10 @@ def transpose(self): matrix_tmp[key_j][key_i] = res.matrix[key_i][key_j].T else: matrix_tmp[key_j] = {key_i: res.matrix[key_i][key_j].T} + if key_i in res.adjacency_j: + res.adjacency_j[key_i].append(key_j) + else: + res.adjacency_j[key_i] = [key_j] res.matrix = matrix_tmp tmp = deepcopy(res.variable_dict_i) diff --git a/requirements.txt b/requirements.txt index 7eef7d6..6e0059c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ pandas>=1.5.3 numpy>=1.24.1 -scipy>=1.10.0 +scipy>=1.12.0 pytest>=7.2.1 matplotlib>=3.6.2 diff --git a/setup.cfg b/setup.cfg index fb9472b..7966896 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ license = { file="LICENSE" } [options] packages = find: install_requires= - scipy==1.10.0 + scipy>=1.12.0 [options.packages.find] # do not mistake tests/ for a package directory exclude=_test* From 7863f6089e3c0ad1cec720605047e4aa660f64f4 Mon Sep 17 00:00:00 2001 From: Frederike Duembgen Date: Tue, 23 Jan 2024 23:49:29 -0500 Subject: [PATCH 5/9] Small speed improvement --- poly_matrix/poly_matrix.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/poly_matrix/poly_matrix.py b/poly_matrix/poly_matrix.py index 54d1bcf..0ed5979 100644 --- a/poly_matrix/poly_matrix.py +++ b/poly_matrix/poly_matrix.py @@ -528,12 +528,11 @@ def get_matrix_sparse(self, variables=None, output_type="coo"): data_list = [] # Loop through blocks of stored matrices - for key_i in variable_dict["i"]: - for key_j in variable_dict["j"]: - try: - values = self.matrix[key_i][key_j] - except KeyError: - continue + for key_i in set(variable_dict["i"]).intersection(self.matrix.keys()): + for key_j in set(variable_dict["j"]).intersection( + self.matrix[key_i].keys() + ): + values = self.matrix[key_i][key_j] # Check if blocks appear in variable dictionary assert values.shape == ( variable_dict["i"][key_i], From b63c106acc2d538b53ba31c7d21919519c7e48ff Mon Sep 17 00:00:00 2001 From: Frederike Duembgen Date: Fri, 5 Apr 2024 17:58:21 +0200 Subject: [PATCH 6/9] Fix verbose keyword --- poly_matrix/poly_matrix.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/poly_matrix/poly_matrix.py b/poly_matrix/poly_matrix.py index c944ecf..91991b4 100644 --- a/poly_matrix/poly_matrix.py +++ b/poly_matrix/poly_matrix.py @@ -1,4 +1,3 @@ -import itertools from copy import deepcopy import matplotlib.pyplot as plt @@ -477,7 +476,7 @@ def get_start_indices(self, axis=0): else: raise ValueError(f"Invalid axis {axis}") - def get_matrix_sparse(self, variables=None, output_type="coo"): + def get_matrix_sparse(self, variables=None, output_type="coo", verbose=False): """Return a sparse matrix in desired format. :param variables: same as in self.get_matrix, but None is not allowed From aa1202260f295024a3e09abdf2fcef3a859df991 Mon Sep 17 00:00:00 2001 From: Frederike Duembgen Date: Fri, 5 Apr 2024 18:11:59 +0200 Subject: [PATCH 7/9] Update requirements --- poly_matrix/poly_matrix.py | 12 +++++++----- requirements.txt | 3 +-- setup.cfg | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/poly_matrix/poly_matrix.py b/poly_matrix/poly_matrix.py index 91991b4..6f5fdea 100644 --- a/poly_matrix/poly_matrix.py +++ b/poly_matrix/poly_matrix.py @@ -1,3 +1,4 @@ +import itertools from copy import deepcopy import matplotlib.pyplot as plt @@ -529,11 +530,12 @@ def get_matrix_sparse(self, variables=None, output_type="coo", verbose=False): data_list = [] # Loop through blocks of stored matrices - for key_i in set(variable_dict["i"]).intersection(self.matrix.keys()): - for key_j in set(variable_dict["j"]).intersection( - self.matrix[key_i].keys() - ): - values = self.matrix[key_i][key_j] + for key_i in variable_dict["i"]: + for key_j in variable_dict["j"]: + try: + values = self.matrix[key_i][key_j] + except KeyError: + continue # Check if blocks appear in variable dictionary assert values.shape == ( variable_dict["i"][key_i], diff --git a/requirements.txt b/requirements.txt index 8f69501..7eef7d6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ pandas>=1.5.3 numpy>=1.24.1 +scipy>=1.10.0 pytest>=7.2.1 matplotlib>=3.6.2 -scipy -pytest-cov diff --git a/setup.cfg b/setup.cfg index c3e41a5..b1b55ad 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ license = { file="LICENSE" } [options] packages = find: install_requires= - scipy + scipy>=1.10.0 [options.packages.find] # do not mistake tests/ for a package directory exclude=_test* From 6d822027301af7f108ecd64a435586280c31abf9 Mon Sep 17 00:00:00 2001 From: Frederike Duembgen Date: Tue, 23 Apr 2024 16:20:21 +0200 Subject: [PATCH 8/9] Update version to 0.1.0 --- poly_matrix/__init__.py | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/poly_matrix/__init__.py b/poly_matrix/__init__.py index 5f428d9..4cda31a 100644 --- a/poly_matrix/__init__.py +++ b/poly_matrix/__init__.py @@ -1,3 +1,3 @@ from .poly_matrix import * -__version__ = "0.0.2" +__version__ = "0.1.0" diff --git a/setup.cfg b/setup.cfg index b1b55ad..707bcb8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = poly_matrix -version = 0.0.2 +version = 0.1.0 authors = [ {name = "Frederike Dümbgen", email = "frederike.dumbgen@utoronto.ca" }, {name = "Connor Holmes", email = "connor.holmes@mail.utoronto.ca" }] From dd862c3567de41bf85c458d1e4c1af9e584152c0 Mon Sep 17 00:00:00 2001 From: Frederike Duembgen Date: Tue, 23 Apr 2024 16:33:05 +0200 Subject: [PATCH 9/9] Fix scipy version and update to 0.1.1 --- poly_matrix/__init__.py | 2 +- requirements.txt | 2 +- setup.cfg | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/poly_matrix/__init__.py b/poly_matrix/__init__.py index 4cda31a..a400362 100644 --- a/poly_matrix/__init__.py +++ b/poly_matrix/__init__.py @@ -1,3 +1,3 @@ from .poly_matrix import * -__version__ = "0.1.0" +__version__ = "0.1.1" diff --git a/requirements.txt b/requirements.txt index 7eef7d6..c203cfc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ pandas>=1.5.3 numpy>=1.24.1 -scipy>=1.10.0 +scipy==1.9.1 pytest>=7.2.1 matplotlib>=3.6.2 diff --git a/setup.cfg b/setup.cfg index 707bcb8..aa60678 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = poly_matrix -version = 0.1.0 +version = 0.1.1 authors = [ {name = "Frederike Dümbgen", email = "frederike.dumbgen@utoronto.ca" }, {name = "Connor Holmes", email = "connor.holmes@mail.utoronto.ca" }] @@ -16,7 +16,7 @@ license = { file="LICENSE" } [options] packages = find: install_requires= - scipy>=1.10.0 + scipy==1.9.1 [options.packages.find] # do not mistake tests/ for a package directory exclude=_test*