Skip to content

Commit

Permalink
Update error message
Browse files Browse the repository at this point in the history
  • Loading branch information
AlainKadar committed Dec 6, 2023
1 parent 8da0f4c commit cb6fd05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions freud/order.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,14 @@ cdef class Nematic(_Compute):
Orientation vectors for which to calculate the order parameter.
""" # noqa: E501
if orientations.shape[1] == 4:
raise ValueError('In freud versions >=3.0.0, Nematic.compute() takes'
raise ValueError('In freud versions >=3.0.0, Nematic.compute() takes '
'3d orientation vectors instead of 4d quaternions.')
orientations = freud.util._convert_array(
orientations, shape=(None, 3))

if len(np.where(~orientations.any(axis=1))[0])!=0:
warnings.warn('You supplied a zero vector in the orientations'
'array, which causes unusual behavior.',
warnings.warn('Including zero vector in the orientations array '
'may lead to undefined behavior.',
UserWarning)
cdef const float[:, ::1] l_orientations = orientations
cdef unsigned int num_particles = l_orientations.shape[0]
Expand Down

0 comments on commit cb6fd05

Please sign in to comment.