FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Documentation test and benchmark · Issue #204 · xtensor-stack/xtensor-python · GitHub

Repository navigation

Documentation test and benchmark #204

Closed

Description

Could we add some documentation about test and benchmark similar to what's in the readthedocs of xtensor.

I run xtensor-python in anaconda and I post my terminal input and the problems I encountered here:

Build the c++ test suite of xtensor-python:

cd test
mkdir build
cd build
cmake -DBUILD_TESTS=ON -DDOWNLOAD_GTEST=ON ../
# maybe needed to find the correct Python lib in an anaconda environment
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/your/anaconda/env/name/lib
make xtest

Build the Python test suite of xtensor-python:

cd test_python
# python setup.py build_ext --inplace
pytest .

Build the benchmark suite of xtensor-python:

I cannot run make xbenchmark because of the following error

../xtensor-python/benchmark/main.cpp:1:31: fatal error: pybind11/pybind11.h: No such file or directory
 #include "pybind11/pybind11.h"

Instead, I tried

cd benchmark
python setup.py build_ext --inplace
pytest .

and got

main.cpp: In function ‘void pybind11_init_benchmark_xtensor_python(pybind11::module&)’:
main.cpp:20:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
         return nullptr;

I simply removed the following lines in main.cpp and I could run the above commands:

    if(_import_array() < 0)
    {
        PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import");
        return nullptr;
    }

However, I got segfault when I ran

python benchmark_pyarray.py
python benchmark_pytensor.py
benchmark_pyvectorize.py

The rest two are fine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL