rigid_body_motion.cartesian_to_spherical

rigid_body_motion.cartesian_to_spherical(arr, axis=- 1)[source]

Transform cartesian to spherical coordinates in three dimensions.

The spherical coordinate system is defined according to ISO 80000-2.

Parameters
arrarray_like

Input array.

axisint, default -1

Axis of input array representing x, y and z in cartesian coordinates. Must be of length 3.

Returns
arr_sphericalarray_like

Output array.