perturbopy.postproc.utils.lattice.reshape_points
- perturbopy.postproc.utils.lattice.reshape_points(point_array)
Method to reshape reciprocal points into a 2d array of shape (3, N) such that reciprocal points are column-oriented - a list of reciprocal points will be transformed to an array - an array of reciprocal points with shape (N, 3) will be reshaped
to shape (3, N) if N != 3
Note that reciprocal points with shape (3, 3) will be assumed to have the correct shape
- Parameters:
point_array (array_like) – An array or list of reciprocal points with shape (3,N), (N,3), or (3,)
- Returns:
point_array – An array of reciprocal points with shape (3,N)
- Return type:
array
- Raises:
ValueError – If the shape of point_array is not (3, N), (N, 3), or (3,)
- Warns:
UserWarning – If point_array is a 3x3 array, a warning is issued that the points are assumed to be column-oriented already.