@@ -273,7 +273,7 @@ def get_distance(self, i: int, j: int) -> float:
273
273
raise NotImplementedError
274
274
275
275
@property
276
- def distance_matrix (self ) -> np .ndarray :
276
+ def distance_matrix (self ) -> NDArray [ np .float64 ] :
277
277
"""The distance matrix between all sites in the structure. For
278
278
periodic structures, this is overwritten to return the nearest image
279
279
distance.
@@ -403,7 +403,7 @@ def num_sites(self) -> int:
403
403
return len (self )
404
404
405
405
@property
406
- def cart_coords (self ) -> np .ndarray :
406
+ def cart_coords (self ) -> NDArray [ np .float64 ] :
407
407
"""An np.array of the Cartesian coordinates of sites in the structure."""
408
408
return np .array ([site .coords for site in self ])
409
409
@@ -3889,9 +3889,9 @@ def get_boxed_structure(
3889
3889
offset = np .array ([0 , 0 , 0 ])
3890
3890
3891
3891
coords = np .array (self .cart_coords )
3892
- x_range = max (coords [:, 0 ]) - min (coords [:, 0 ])
3893
- y_range = max (coords [:, 1 ]) - min (coords [:, 1 ])
3894
- z_range = max (coords [:, 2 ]) - min (coords [:, 2 ])
3892
+ x_range = max (coords [:, 0 ]) - min (coords [:, 0 ]) # type:ignore[type-var]
3893
+ y_range = max (coords [:, 1 ]) - min (coords [:, 1 ]) # type:ignore[type-var]
3894
+ z_range = max (coords [:, 2 ]) - min (coords [:, 2 ]) # type:ignore[type-var]
3895
3895
3896
3896
if a <= x_range or b <= y_range or c <= z_range :
3897
3897
raise ValueError ("Box is not big enough to contain Molecule." )
0 commit comments