code: def _broadcast_to_axis(arr, axis, ndim):
      
      if arr.ndim == 1 and arr.ndim < ndim:
          new_shape = [1] * ndim
          new_shape[axis] = arr.size
          arr = arr.reshape(*new_shape)
      return arr
docs: Handle reshaping coordinate array to have proper dimensionality.
  
      This puts the values along the specified axis.