Skip to content

Commit 76cac17

Browse files
committed
more
1 parent d0d111b commit 76cac17

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.devel/sphinx/alphamarek.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def get_book_template(self, e):
113113
self.format_btitle(e, 'title'),
114114
self.format_volume_and_series(e),
115115
sentence [
116-
field('publisher'),
116+
optional_field('publisher'),
117117
optional_field('address'),
118118
self.format_edition(e)
119119
],

.devel/sphinx/bibliography.bib

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ @book{datawranglingpy
4545
publisher = {Zenodo},
4646
address = {Melbourne},
4747
url = {https://datawranglingpy.gagolewski.com/},
48-
year = {2022}
48+
year = {2024}
4949
}
5050

5151
@book{deepr,
5252
author = {M. Gagolewski},
5353
title = {Deep {R} Programming},
5454
url = {https://deepr.gagolewski.com/},
55-
year = {2023},
55+
year = {2024},
5656
doi = {10.5281/zenodo.7490464},
5757
isbn = {978-0-6455719-2-9},
5858
publisher = {Zenodo},

clustbench/load_results.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,9 @@ def save_results(filename, results, expanduser=True, expandvars=True):
213213
>>> results_path = os.path.join("~", "Projects", "clustering-results-v1", "original")
214214
>>> res = clustbench.load_results("*", "wut", "x2", 3, path=results_path)
215215
>>> print(res.keys())
216-
>>> clustbench.save_results("x1.result3.gz", clustbench.transpose_results(res)[3])
216+
>>> clustbench.save_results(
217+
... os.path.join(results_path, "method", "wut", "x2.result3.gz"),
218+
... clustbench.transpose_results(res)[3])
217219
"""
218220
if type(results) is not dict:
219221
raise ValueError("`results` is not a dict")
@@ -223,11 +225,11 @@ def save_results(filename, results, expanduser=True, expandvars=True):
223225
if not np.all(res.min().isin([0, 1])):
224226
raise ValueError("Minimal label neither 0 nor 1.")
225227

226-
mx = res.max()
227-
if not mx[0] >= 1:
228+
mx = res.max(axis=None)
229+
if not mx >= 1:
228230
raise ValueError("At least 1 cluster is necessary.")
229231

230-
if not np.all(mx == mx[0]):
232+
if not np.all(res.max(axis=0) == mx):
231233
raise ValueError("All partitions should be of the same cardinality.")
232234

233235
if not np.all(res.apply(np.bincount).iloc[1:, :] > 0):

0 commit comments

Comments
 (0)