.. _routines.indexing: .. _arrays.indexing: Indexing routines ================= The following table lists both implemented and not implemented methods. If you have need of an operation that is listed as not implemented, feel free to open an issue on the `GitHub repository`_, or give a thumbs up to already created issues. Contributions are also welcome! The following table is structured as follows: The first column contains the method name. The second column contains link to a description of corresponding numpy method. The third column is a flag for whether or not there is an implementation in Xorbits for the method in the left column. ``Y`` stands for yes, ``N`` stands for no, ``P`` standsfor partial (meaning some parameters may not be supported yet), and ``D`` stands for default to numpy. Generating index arrays ----------------------- +-----------------------+----------------------+------------------------+----------------------------------+ | ``xorbits.numpy`` | ``numpy`` | Implemented? (Y/N/P/D) | Notes for Current implementation | +-----------------------+----------------------+------------------------+----------------------------------+ | ``c_`` | `c_`_ | Y | | +-----------------------+----------------------+------------------------+----------------------------------+ | ``r_`` | `r_`_ | Y | | +-----------------------+----------------------+------------------------+----------------------------------+ | ``s_`` | `s_`_ | Y | | +-----------------------+----------------------+------------------------+----------------------------------+ | ``nonzero`` | `nonzero`_ | Y | | +-----------------------+----------------------+------------------------+----------------------------------+ | ``where`` | `where`_ | Y | | +-----------------------+----------------------+------------------------+----------------------------------+ | ``indices`` | `indices`_ | Y | | +-----------------------+----------------------+------------------------+----------------------------------+ | ``ix_`` | `ix_`_ | Y | | +-----------------------+----------------------+------------------------+----------------------------------+ | ``ogrid`` | `ogrid`_ | Y | | +-----------------------+----------------------+------------------------+----------------------------------+ | ``ravel_multi_index`` | `ravel_multi_index`_ | Y | | +-----------------------+----------------------+------------------------+----------------------------------+ | ``unravel_index`` | `unravel_index`_ | Y | | +-----------------------+----------------------+------------------------+----------------------------------+ | ``diag_indices`` | `diag_indices`_ | Y | | +-----------------------+----------------------+------------------------+----------------------------------+ | ``diag_indices_from`` | `diag_indices_from`_ | Y | | +-----------------------+----------------------+------------------------+----------------------------------+ | ``mask_indices`` | `mask_indices`_ | Y | | +-----------------------+----------------------+------------------------+----------------------------------+ | ``tril_indices`` | `tril_indices`_ | Y | | +-----------------------+----------------------+------------------------+----------------------------------+ | ``tril_indices_from`` | `tril_indices_from`_ | Y | | +-----------------------+----------------------+------------------------+----------------------------------+ | ``triu_indices`` | `triu_indices`_ | Y | | +-----------------------+----------------------+------------------------+----------------------------------+ | ``triu_indices_from`` | `triu_indices_from`_ | Y | | +-----------------------+----------------------+------------------------+----------------------------------+ Indexing-like operations ------------------------ +-------------------------------------------+------------------------------------------+------------------------+----------------------------------+ | ``xorbits.numpy`` | ``numpy`` | Implemented? (Y/N/P/D) | Notes for Current implementation | +-------------------------------------------+------------------------------------------+------------------------+----------------------------------+ | ``take`` | `take`_ | Y | | +-------------------------------------------+------------------------------------------+------------------------+----------------------------------+ | ``take_along_axis`` | `take_along_axis`_ | Y | | +-------------------------------------------+------------------------------------------+------------------------+----------------------------------+ | ``choose`` | `choose`_ | Y | | +-------------------------------------------+------------------------------------------+------------------------+----------------------------------+ | ``compress`` | `compress`_ | Y | | +-------------------------------------------+------------------------------------------+------------------------+----------------------------------+ | ``diag`` | `diag`_ | Y | | +-------------------------------------------+------------------------------------------+------------------------+----------------------------------+ | ``diagonal`` | `diagonal`_ | Y | | +-------------------------------------------+------------------------------------------+------------------------+----------------------------------+ | ``select`` | `select`_ | Y | | +-------------------------------------------+------------------------------------------+------------------------+----------------------------------+ | ``lib.stride_tricks.sliding_window_view`` | `lib.stride_tricks.sliding_window_view`_ | Y | | +-------------------------------------------+------------------------------------------+------------------------+----------------------------------+ | ``lib.stride_tricks.as_strided`` | `lib.stride_tricks.as_strided`_ | Y | | +-------------------------------------------+------------------------------------------+------------------------+----------------------------------+ Inserting data into arrays -------------------------- +--------------------+-------------------+------------------------+----------------------------------+ | ``xorbits.numpy`` | ``numpy`` | Implemented? (Y/N/P/D) | Notes for Current implementation | +--------------------+-------------------+------------------------+----------------------------------+ | ``place`` | `place`_ | Y | | +--------------------+-------------------+------------------------+----------------------------------+ | ``put`` | `put`_ | Y | | +--------------------+-------------------+------------------------+----------------------------------+ | ``put_along_axis`` | `put_along_axis`_ | Y | | +--------------------+-------------------+------------------------+----------------------------------+ | ``putmask`` | `putmask`_ | Y | | +--------------------+-------------------+------------------------+----------------------------------+ | ``fill_diagonal`` | `fill_diagonal`_ | Y | | +--------------------+-------------------+------------------------+----------------------------------+ Iterating over arrays --------------------- +----------------------+---------------------+------------------------+----------------------------------+ | ``xorbits.numpy`` | ``numpy`` | Implemented? (Y/N/P/D) | Notes for Current implementation | +----------------------+---------------------+------------------------+----------------------------------+ | ``nditer`` | `nditer`_ | Y | | +----------------------+---------------------+------------------------+----------------------------------+ | ``ndenumerate`` | `ndenumerate`_ | Y | | +----------------------+---------------------+------------------------+----------------------------------+ | ``ndindex`` | `ndindex`_ | Y | | +----------------------+---------------------+------------------------+----------------------------------+ | ``nested_iters`` | `nested_iters`_ | Y | | +----------------------+---------------------+------------------------+----------------------------------+ | ``flatiter`` | `flatiter`_ | Y | | +----------------------+---------------------+------------------------+----------------------------------+ | ``lib.Arrayterator`` | `lib.Arrayterator`_ | Y | | +----------------------+---------------------+------------------------+----------------------------------+ | ``iterable`` | `iterable`_ | Y | | +----------------------+---------------------+------------------------+----------------------------------+ .. _`GitHub repository`: https://github.com/xorbitsai/xorbits/issues .. _`c_`: https://numpy.org/doc/stable/reference/generated/numpy.c_.html .. _`r_`: https://numpy.org/doc/stable/reference/generated/numpy.r_.html .. _`s_`: https://numpy.org/doc/stable/reference/generated/numpy.s_.html .. _`nonzero`: https://numpy.org/doc/stable/reference/generated/numpy.nonzero.html .. _`where`: https://numpy.org/doc/stable/reference/generated/numpy.where.html .. _`indices`: https://numpy.org/doc/stable/reference/generated/numpy.indices.html .. _`ix_`: https://numpy.org/doc/stable/reference/generated/numpy.ix_.html .. _`ogrid`: https://numpy.org/doc/stable/reference/generated/numpy.ogrid.html .. _`ravel_multi_index`: https://numpy.org/doc/stable/reference/generated/numpy.ravel_multi_index.html .. _`unravel_index`: https://numpy.org/doc/stable/reference/generated/numpy.unravel_index.html .. _`diag_indices`: https://numpy.org/doc/stable/reference/generated/numpy.diag_indices.html .. _`diag_indices_from`: https://numpy.org/doc/stable/reference/generated/numpy.diag_indices_from.html .. _`mask_indices`: https://numpy.org/doc/stable/reference/generated/numpy.mask_indices.html .. _`tril_indices`: https://numpy.org/doc/stable/reference/generated/numpy.tril_indices.html .. _`tril_indices_from`: https://numpy.org/doc/stable/reference/generated/numpy.tril_indices_from.html .. _`triu_indices`: https://numpy.org/doc/stable/reference/generated/numpy.triu_indices.html .. _`triu_indices_from`: https://numpy.org/doc/stable/reference/generated/numpy.triu_indices_from.html .. _`take`: https://numpy.org/doc/stable/reference/generated/numpy.take.html .. _`take_along_axis`: https://numpy.org/doc/stable/reference/generated/numpy.take_along_axis.html .. _`choose`: https://numpy.org/doc/stable/reference/generated/numpy.choose.html .. _`compress`: https://numpy.org/doc/stable/reference/generated/numpy.compress.html .. _`diag`: https://numpy.org/doc/stable/reference/generated/numpy.diag.html .. _`diagonal`: https://numpy.org/doc/stable/reference/generated/numpy.diagonal.html .. _`select`: https://numpy.org/doc/stable/reference/generated/numpy.select.html .. _`lib.stride_tricks.sliding_window_view`: https://numpy.org/doc/stable/reference/generated/numpy.lib.stride_tricks.sliding_window_view.html .. _`lib.stride_tricks.as_strided`: https://numpy.org/doc/stable/reference/generated/numpy.lib.stride_tricks.as_strided.html .. _`place`: https://numpy.org/doc/stable/reference/generated/numpy.place.html .. _`put`: https://numpy.org/doc/stable/reference/generated/numpy.put.html .. _`put_along_axis`: https://numpy.org/doc/stable/reference/generated/numpy.put_along_axis.html .. _`putmask`: https://numpy.org/doc/stable/reference/generated/numpy.putmask.html .. _`fill_diagonal`: https://numpy.org/doc/stable/reference/generated/numpy.fill_diagonal.html .. _`nditer`: https://numpy.org/doc/stable/reference/generated/numpy.nditer.html .. _`ndenumerate`: https://numpy.org/doc/stable/reference/generated/numpy.ndenumerate.html .. _`ndindex`: https://numpy.org/doc/stable/reference/generated/numpy.ndindex.html .. _`nested_iters`: https://numpy.org/doc/stable/reference/generated/numpy.nested_iters.html .. _`flatiter`: https://numpy.org/doc/stable/reference/generated/numpy.flatiter.html .. _`lib.Arrayterator`: https://numpy.org/doc/stable/reference/generated/numpy.lib.Arrayterator.html .. _`iterable`: https://numpy.org/doc/stable/reference/generated/numpy.iterable.html