Skip to content

Commit c2ca47f

Browse files
committed
Fix weird bug.
1 parent 3ec8f43 commit c2ca47f

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

src/pymatgen/core/lattice.py

+5-12
Original file line numberDiff line numberDiff line change
@@ -1893,19 +1893,12 @@ def get_points_in_spheres(
18931893
if not valid_coords:
18941894
return [[]] * len(center_coords)
18951895
valid_coords = np.concatenate(valid_coords, axis=0)
1896-
return get_points_in_spheres(
1897-
valid_coords, # type:ignore[arg-type]
1898-
center_coords,
1899-
r,
1900-
pbc,
1901-
numerical_tol,
1902-
lattice,
1903-
return_fcoords=return_fcoords,
1904-
)
1896+
valid_images = np.concatenate(valid_images, axis=0) # type:ignore[assignment]
19051897

1906-
valid_coords = all_coords # type: ignore[assignment]
1907-
valid_images = [[0, 0, 0]] * len(valid_coords) # type: ignore[list-item]
1908-
valid_indices = np.arange(len(valid_coords)) # type: ignore[assignment]
1898+
else:
1899+
valid_coords = all_coords # type: ignore[assignment]
1900+
valid_images = [[0, 0, 0]] * len(valid_coords) # type: ignore[list-item]
1901+
valid_indices = np.arange(len(valid_coords)) # type: ignore[assignment]
19091902

19101903
# Divide the valid 3D space into cubes and compute the cube ids
19111904
all_cube_index = _compute_cube_index(valid_coords, global_min, r) # type: ignore[arg-type]

0 commit comments

Comments
 (0)