Function to transform Cartesian coordinates to spherical coordinates.

In the following, A1 to An are optional batch dimensions.

point_spherical A tensor of shape [A1, ..., An, 3]. The last dimension contains r, theta, and phi that respectively correspond to the radius, polar angle and azimuthal angle; r must be non-negative.
name A name for this op. Defaults to "spherical_to_cartesian_coordinates".

tf.errors.InvalidArgumentError If r, theta or phi contains out of range data.

A tensor of shape [A1, ..., An, 3], where the last dimension contains the cartesian coordinates in x,y,z order.