xtensor Logo

INSTALLATION

  • Installation
  • Changelog

USAGE

  • Getting started
  • Expressions and lazy evaluation
  • Arrays and tensors
  • Scalars and 0-D expressions
  • Adapting 1-D containers
  • Operators and functions
  • Views
  • Indices
  • Expression builders
  • Missing values
  • Histogram
  • Random
  • Tensor Rank
  • File input and output
  • Build and configuration
  • Common pitfalls

QUICK REFERENCE

  • Basics
  • Builders
  • Operators
  • Mathematical functions
  • Reductions
  • Views
  • Iterators
  • Manipulation
  • Chunked arrays

API REFERENCE

  • Expressions and semantic
  • Containers and views
  • Iterators
  • Functions and generators
  • IO Operations
  • Mathematical functions
    • Operators and related functions
    • Index related functions
      • from_indices()
    • Basic functions
    • Exponential functions
    • Power functions
    • Trigonometric functions
    • Hyperbolic functions
    • Error and gamma functions
    • Nearest integer floating point operations
    • Classification functions
    • Reducing functions
    • Accumulating functions
    • NaN functions
  • Shape/index manipulation

DEVELOPER ZONE

  • Compiler workarounds
  • Build and configuration
  • Internals of xtensor
  • Extending xtensor
  • Releasing xtensor

MISCELLANEOUS

  • From NumPy to xtensor
  • Notable differences with numpy
  • Closure semantics
  • Related projects
  • Designing language bindings with xtensor
xtensor
  • Mathematical functions
  • Index related functions
  • View page source

Index related functions

Defined in xtensor/xoperation.hpp

Warning

doxygenfunction: Cannot find function “where” in doxygen xml output for project “xtensor” from directory: ../xml

Warning

doxygenfunction: Cannot find function “nonzero” in doxygen xml output for project “xtensor” from directory: ../xml

Warning

doxygenfunction: Cannot find function “argwhere” in doxygen xml output for project “xtensor” from directory: ../xml

template<class T>
inline auto xt::from_indices(const std::vector<T> &idx)

Converts std::vector<index_type> (returned e.g.

from xt::argwhere) to xtensor.

Parameters:

idx – vector of indices

Returns:

xt::xtensor<typename index_type::value_type, 2> (e.g. xt::xtensor<size_t, 2>)

Previous Next

© Copyright 2024, Johan Mabille, Sylvain Corlay and Wolf Vollprecht.

Built with Sphinx using a theme provided by Read the Docs.