Skip to content

Commit 81bcdc2

Browse files
committed
fix
1 parent 7171e18 commit 81bcdc2

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

_doc/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"""
7272

7373
# The following is used by sphinx.ext.linkcode to provide links to github
74-
linkcode_resolve = make_linkcode_resolve(
74+
_linkcode_resolve = make_linkcode_resolve(
7575
"teachpyx",
7676
(
7777
"https://github.com/sdpython/teachpyx/"
@@ -80,6 +80,11 @@
8080
),
8181
)
8282

83+
84+
def linkcode_resolve(domain, info):
85+
return _linkcode_resolve(domain, info)
86+
87+
8388
latex_elements = {
8489
"papersize": "a4",
8590
"pointsize": "10pt",

_doc/py/c_regex/regex.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ et :func:`re.match` retournent toutes des objets :func:`re.match` :
275275
date 7 : 08/03/1941 date 8 : 8/1/1980 date 9 : 30/6/1976"""
276276

277277
import re
278-
expression = re.compile("([0-3]?[0-9]/[0-1]?[0-9]/([0-2][0-9])?[0-9][0-9])[^\d]")
278+
expression = re.compile("([0-3]?[0-9]/[0-1]?[0-9]/([0-2][0-9])?[0-9][0-9])[^\\d]")
279279
print(expression.search(s).group(1,2)) # affiche ('14/9/2000', '20')
280280
c = expression.search(s).span(1) # affiche (9, 18)
281281
print(s[c[0]:c[1]]) # affiche 14/9/2000

teachpyx/video/tsp_kohonen_pygame.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,9 @@ def pygame_simulation(
9595
wait_event(pygame)
9696
images = [] if folder is not None else None
9797

98-
for iter in tqdm(list(range(max_iter)), desc="optimizing"):
99-
iter += 1
98+
for n_iter in tqdm(list(range(max_iter)), desc="optimizing"):
10099

101-
if iter % maj == 0:
100+
if n_iter % maj == 0:
102101
modifie_structure(neurones, compte_n, tour)
103102
dist *= alpha
104103
f2 = tuple(w * beta for w in fs)
@@ -112,7 +111,7 @@ def pygame_simulation(
112111
empty_main_loop(pygame)
113112
pygame.display.flip()
114113

115-
if images is not None and iter % 10 == 0:
114+
if images is not None and n_iter % 10 == 0:
116115
images.append(screen.copy())
117116

118117
if first_click:

0 commit comments

Comments
 (0)