Skip to content

Axeldnahcram/td3a_cpp

 
 

Repository files navigation

image

Build status

Build Status Windows

image

GitHub Issues

MIT License

td3a_cpp: template to use cython and C++ with python

This module is forked from an Xavier Dupré project

Our aim was to add, the same way the dot module was implemented three different applications:

  • matmul: a simple comparison of execution in python, cython and numpy of the terms by terms multiplication
  • linreg: a comparison between different implementation of regularized linear regression
  • random_forest: a comparison between different implementation of random forest

The different plots are available in the plot folder.


image

documentation

Simple template to implement an algorithm with cython and openmp. It implements simple examples to demonstrate the speed up obtained by using cython. The module must be compiled to be used inplace:

python setup.py build_ext --inplace

Generate the setup in subfolder dist:

python setup.py sdist

Generate the documentation in folder dist/html:

python -m sphinx -T -b html doc dist/html

Run the unit tests:

python -m unittest discover tests

Or:

python -m pytest

To check style:

python -m flake8 td3a_cpp tests examples

The function check or the command line python -m td3a_cpp check checks the module is properly installed and returns processing time for a couple of functions or simply:

import td3a_cpp
td3a_cpp.check()

About

Example of a python module using Cython and openmp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 70.4%
  • Jupyter Notebook 13.6%
  • C++ 12.6%
  • Batchfile 1.8%
  • C 1.6%