def _range(start, limit=None, delta=1, dtype=None, name='range'):
    'Emulates tf.range.'
    dtype = utils.numpy_dtype(dtype)
    start = ops.convert_to_tensor(start, dtype=dtype)
    limit = (None if (limit is None) else ops.convert_to_tensor(limit, dtype=dtype))
    delta = ops.convert_to_tensor(delta, dtype=dtype)
    if (dtype is None):
        dtype_hierarchy = [np.int32, np.int64, np.float32, np.float64]
        inferred_dtype = max([arg.dtype for arg in [start, limit, delta] if (arg is not None)], key=dtype_hierarchy.index)
    else:
        inferred_dtype = dtype
    return np.arange(start, limit, delta).astype(inferred_dtype)
Emulates tf.range.
def _range(start, limit=None, delta=1, dtype=None, name='range'):
    
    dtype = utils.numpy_dtype(dtype)
    start = ops.convert_to_tensor(start, dtype=dtype)
    limit = (None if (limit is None) else ops.convert_to_tensor(limit, dtype=dtype))
    delta = ops.convert_to_tensor(delta, dtype=dtype)
    if (dtype is None):
        dtype_hierarchy = [np.int32, np.int64, np.float32, np.float64]
        inferred_dtype = max([arg.dtype for arg in [start, limit, delta] if (arg is not None)], key=dtype_hierarchy.index)
    else:
        inferred_dtype = dtype
    return np.arange(start, limit, delta).astype(inferred_dtype)