xtensor-stack / xtensor-python

Python bindings for xtensor
BSD 3-Clause "New" or "Revised" License
347 stars 58 forks source link

Error: no type named 'storage type' (when using xt::pyarray in class) #143

Closed iamthebot closed 6 years ago

iamthebot commented 6 years ago

When attempting to use xt::pyarray in a class (where substituting xt::xarray works perfectly) I receive the following error during compilation:

.../third_party/xtensor/include/xtensor/xcontainer.hpp:34:78: error: no type named 'storage_type' in 'struct xt::xcontainer_inner_types<xt::pyarray<double> >'
         using storage_type = typename xcontainer_inner_types<D>::storage_type;

I have a class that's more or less as follows:

class SomeClass {
  xt::pyarray<double> mean_;
  xt::pyarray<double> variance_;
};

I'm using the latest xtensor, xtensor-simd, and xtensor-python as of may 4.

Using GCC6 (via homebrew) on OSX.

SylvainCorlay commented 6 years ago

You need to use the latest tagged version of xtensor instead of the master branch.

At the moment it should be 0.15.x.

Master branch includes changes that will be in 0.16 and are backward incompatible and will require updating xtensor-python.

SylvainCorlay commented 6 years ago

Thanks. Closing the issue. Don't hesitate to post more comments here should yoi have any problem.