def _linspace(start, stop, num, name=None, axis=0):
    'Match TF behavior with np.linspace.'
    start = ops.convert_to_tensor(start)
    if np.issubdtype(start.dtype, np.integer):
        start = start.astype(np.float64)
    stop = ops.convert_to_tensor(stop, dtype=start.dtype)
    num = ops.convert_to_tensor(num, dtype_hint=np.int32)
    if (not np.issubdtype(num.dtype, np.integer)):
        raise TypeError('`num` must be an integer but got {}'.format(num.dtype))
    num = num.astype(np.int32)
    return np.linspace(start, stop, num, axis=axis).astype(start.dtype)
Match TF behavior with np.linspace.
def _linspace(start, stop, num, name=None, axis=0):
    
    start = ops.convert_to_tensor(start)
    if np.issubdtype(start.dtype, np.integer):
        start = start.astype(np.float64)
    stop = ops.convert_to_tensor(stop, dtype=start.dtype)
    num = ops.convert_to_tensor(num, dtype_hint=np.int32)
    if (not np.issubdtype(num.dtype, np.integer)):
        raise TypeError('`num` must be an integer but got {}'.format(num.dtype))
    num = num.astype(np.int32)
    return np.linspace(start, stop, num, axis=axis).astype(start.dtype)