def make_tensor(shape, dtype:dtypes, noncontiguous) -> Tensor:
  r"""Creates a tensor with the given :attr:`shape`, :attr:`device`, and :attr:`dtype`, and filled with
  values uniformly drawn from ``[low, high)``.

  If :attr:`low` or :attr:`high` are specified and are outside the range of the :attr:`dtype`'s representable
  finite values then they are clamped to the lowest or highest representable finite value, respectively.
  If ``None``, then the following table describes the default values for :attr:`low` and :attr:`high`,
  which depend on :attr:`dtype`.

  +---------------------------+------------+----------+
  | ``dtype``                 | ``low``    | ``high`` |
  +===========================+============+==========+
  | boolean type              | ``0``      | ``2``    |
  +---------------------------+------------+----------+
  | unsigned integral type    | ``0``      | ``10``   |
  +---------------------------+------------+----------+
  | signed integral types     | ``-9``     | ``10``   |
  +---------------------------+------------+----------+
  | floating types            | ``-9``     | ``9``    |
  +---------------------------+------------+----------+
  | complex types             | ``-9``     | ``9``    |
  +---------------------------+------------+----------+
  """
  contiguous = not noncontiguous
  if dtype == dtypes.bool: return Tensor.randint(shape=shape, low=0, high=2, contiguous=contiguous).cast(dtypes.bool)
  elif dtype.is_unsigned(): return Tensor.randint(shape=shape, low=0, high=10, contiguous=contiguous).cast(dtype)
  elif dtype.is_int(): return Tensor.randint(shape=shape, low=-9, high=10, contiguous=contiguous).cast(dtype) # signed int
  elif dtype.is_float(): return Tensor.rand(shape=shape, low=-9, high=9, dtype=dtype, contiguous=contiguous)
  else: raise NotImplementedError(f"{dtype} not implemented")
Creates a tensor with the given :attr:`shape`, :attr:`device`, and :attr:`dtype`, and filled with
  values uniformly drawn from ``[low, high)``.

  If :attr:`low` or :attr:`high` are specified and are outside the range of the :attr:`dtype`'s representable
  finite values then they are clamped to the lowest or highest representable finite value, respectively.
  If ``None``, then the following table describes the default values for :attr:`low` and :attr:`high`,
  which depend on :attr:`dtype`.

  +---------------------------+------------+----------+
  | ``dtype``                 | ``low``    | ``high`` |
  +===========================+============+==========+
  | boolean type              | ``0``      | ``2``    |
  +---------------------------+------------+----------+
  | unsigned integral type    | ``0``      | ``10``   |
  +---------------------------+------------+----------+
  | signed integral types     | ``-9``     | ``10``   |
  +---------------------------+------------+----------+
  | floating types            | ``-9``     | ``9``    |
  +---------------------------+------------+----------+
  | complex types             | ``-9``     | ``9``    |
  +---------------------------+------------+----------+
  
test/unit/test_indexing.py