diff --git a/README.md b/README.md index cd2387f1..1391cb3f 100755 --- a/README.md +++ b/README.md @@ -262,7 +262,7 @@ If you use Riskfolio-Lib for published work, please use the following BibTeX ent ``` @misc{riskfolio, author = {Dany Cajas}, - title = {Riskfolio-Lib (6.2.1)}, + title = {Riskfolio-Lib (6.2.2)}, year = {2024}, url = {https://github.com/dcajasn/Riskfolio-Lib}, } diff --git a/docs/source/conf.py b/docs/source/conf.py index 6478b629..03cd5d70 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -25,7 +25,7 @@ copyright = '2020-2024, Dany Cajas' author = 'Dany Cajas' -__version__ = "6.2.1" +__version__ = "6.2.2" # The short X.Y version version = '.'.join(__version__.split('.')[:2]) diff --git a/docs/source/index.rst b/docs/source/index.rst index 78a5f70e..7d8513d4 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -310,7 +310,7 @@ If you use Riskfolio-Lib for published work, please use the following BibTeX ent @misc{riskfolio, author = {Dany Cajas}, - title = {Riskfolio-Lib (6.2.1)}, + title = {Riskfolio-Lib (6.2.2)}, year = {2024}, url = {https://github.com/dcajasn/Riskfolio-Lib}, } diff --git a/riskfolio/src/PlotFunctions.py b/riskfolio/src/PlotFunctions.py index 4feca4fb..016ab964 100644 --- a/riskfolio/src/PlotFunctions.py +++ b/riskfolio/src/PlotFunctions.py @@ -2810,6 +2810,8 @@ def plot_clusters( k, clustering_inds = af.std_silhouette_score(dist, clustering, max_k) else: raise ValueError("The only opt_k_method available are twodiff and stdsil") + else: + clustering_inds = hr.fcluster(clustering, k, criterion="maxclust") clusters = {i: [] for i in np.unique(clustering_inds)} for i, v in enumerate(clustering_inds): @@ -3181,6 +3183,8 @@ def plot_dendrogram( raise ValueError( "The only opt_k_method available are twodiff and stdsil" ) + else: + clustering_inds = hr.fcluster(clustering, k, criterion="maxclust") L, M = hr.leaders(clustering, np.array(clustering_inds, dtype=np.int32)) root, nodes = hr.to_tree(clustering, rd=True) nodes = np.array([i.dist for i in nodes]) diff --git a/setup.py b/setup.py index 5f9caf45..6115b3a7 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ MAJOR = 6 MINOR = 2 -MICRO = 1 +MICRO = 2 VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO) def write_version_py(filename='riskfolio/version.py'):