mirror of https://github.com/phonopy/phonopy.git
Remove lines supporting old numpy versions
This commit is contained in:
parent
671990838d
commit
88d9c4c93e
|
@ -1201,20 +1201,9 @@ class ShortestPairs:
|
|||
)
|
||||
bases = [[1, 0, 0], [0, 1, 0], [0, 0, 1], [-1, -1, -1]]
|
||||
lattice_points = np.dot(lattice_4D, bases)
|
||||
if StrictVersion(np.__version__) >= StrictVersion("1.13.0"):
|
||||
lattice_points = np.array(
|
||||
np.unique(lattice_points, axis=0), dtype=int_dtype, order="C"
|
||||
)
|
||||
else:
|
||||
unique_indices = np.unique(
|
||||
[
|
||||
np.nonzero(np.abs(lattice_points - point).sum(axis=1) == 0)[0][0]
|
||||
for point in lattice_points
|
||||
]
|
||||
)
|
||||
lattice_points = np.array(
|
||||
lattice_points[unique_indices], dtype=int_dtype, order="C"
|
||||
)
|
||||
lattice_points = np.array(
|
||||
np.unique(lattice_points, axis=0), dtype=int_dtype, order="C"
|
||||
)
|
||||
|
||||
return (
|
||||
lattice_points,
|
||||
|
|
Loading…
Reference in New Issue