A LIBRARY
FOR LIBRARIES

XTENSOR IS FAST

XTENSOR IS
FAST
TO USE

WE STICK WITH NUMPY

For the API

but not for the speed

auto arc_distance(xtensor<double, 1>& theta_1, xtensor<double, 1>& phi_1,
                  xtensor<double, 1>& theta_2, xtensor<double, 1>& phi_2)
{
    xtensor<double, 1> temp = pow(sin((theta_2 - theta_1) / 2), 2) + cos(theta_1) * 
                              cos(theta_2) * pow(sin((phi_2 - phi_1) / 2), 2);
    xtensor<double, 1> distance_matrix = 2 * (atan2(sqrt(temp), sqrt(1 - temp)));
    return distance_matrix;
}
def arc_distance(theta_1, phi_1, theta_2, phi_2):
    temp = np.sin((theta_2 - theta_1) / 2) ** 2 + np.cos(theta_1) * \
           np.cos(theta_2) * np.sin((phi_2 - phi_1) / 2) ** 2
    distance_matrix = 2 * (np.arctan2(np.sqrt(temp), np.sqrt(1 - temp)))
    return distance_matrix

XTENSOR IS
FAST
TO EXECUTE

CONTINUALLY BENCHMARKING

We benchmark a lot

XTENSOR IS
FAST
TO EXTEND

  • xsimd
  • xtensor-blas
  • xtensor-io
  • xtensor-interpolation
  • xtensor-fftw
  • ...

A SCIENTIFIC COMPUTING ECOSYSTEM

C++ FIRST

C++ FIRST
PYTHON FIRST
JULIA FIRST
R FIRST

INTER-OPERABILITY

What's in a xtensor?

xarray<T, layout_type::row_major>

xtensor<T, 4>

xtensor_fixed<T, xshape<2, 3, 2>>

Flexible data structures:

 

  • Native support for Row-Major or Column-Major
  • Free dimensions, fixed dimensions and fixed shapes supported

 

 

Made with Slides.com