From 9ed29e7c9b1afb8901bf99b5ad54a22c306fd88c Mon Sep 17 00:00:00 2001 From: kpj2006 <24ucs074@lnmiit.ac.in> Date: Mon, 31 Aug 2026 11:15:38 +0530 Subject: [PATCH] [MNT] update numpy and pandas version requirements in requirements.txt; remove unused linkage_method check in HRPOpt --- pypfopt/hierarchical_portfolio.py | 3 --- requirements.txt | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pypfopt/hierarchical_portfolio.py b/pypfopt/hierarchical_portfolio.py index 6dc76d07..248aac15 100644 --- a/pypfopt/hierarchical_portfolio.py +++ b/pypfopt/hierarchical_portfolio.py @@ -176,9 +176,6 @@ def optimize(self, linkage_method="single"): OrderedDict weights for the HRP portfolio """ - if linkage_method not in sch._LINKAGE_METHODS: - raise ValueError("linkage_method must be one recognised by scipy") - if self.returns is None: cov = self.cov_matrix corr = cov_to_corr(self.cov_matrix).round(6) diff --git a/requirements.txt b/requirements.txt index 7c90d815..1b8a9410 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ cvxpy>=1.1.19 -numpy>=1.0.0 -pandas>=0.19 +numpy>=1.26.0,<3.0.0 +pandas>=1.0.0,<4.0.0 scikit-base<0.14.0 scikit-learn>=0.24.1 scipy>=1.3.0