8000 Merge pull request #90 from vladislavneon/fix-89 · lhoupert/from-python-to-numpy@f476c2b · GitHub
[go: up one dir, main page]

Skip to content

Commit f476c2b

Browse files
authored
Merge pull request rougier#90 from vladislavneon/fix-89
4.2 Uniform vectorization - Python implementation bug fix
2 parents b8f8d94 + f08ccaf commit f476c2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

04-code-vectorization.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Taking the border into account, counting neighbours then is straightforward:
157157
158158
def compute_neighbours(Z):
159159
shape = len(Z), len(Z[0])
160-
N = [[0,]*(shape[0]) for i in range(shape[1])]
160+
N = [[0,]*(shape[1]) for i in range(shape[0])]
161161
for x in range(1,shape[0]-1):
162162
for y in range(1,shape[1]-1):
163163
N[x][y] = Z[x-1][y-1]+Z[x][y-1]+Z[x+1][y-1] \

0 commit comments

Comments
 (0)
0