Further WIP
This commit is contained in:
parent
739ef26da3
commit
836fa2eb40
15 changed files with 581 additions and 5 deletions
5
python/.gitignore
vendored
Normal file
5
python/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
.ipynb_checkpoints/
|
||||
__pycache__/
|
||||
build/
|
||||
fir.py
|
||||
pyfir_wrap.cxx
|
||||
299
python/filter_analysis.ipynb
Normal file
299
python/filter_analysis.ipynb
Normal file
File diff suppressed because one or more lines are too long
1
python/fir++.h
Symbolic link
1
python/fir++.h
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../obj/fir++.h
|
||||
24
python/pyfir.i
Normal file
24
python/pyfir.i
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
%module fir
|
||||
%include <complex.i>
|
||||
|
||||
/*
|
||||
* List conversion
|
||||
*
|
||||
* SWIG knows how to turn std::vector<T> func() into a function that returns a
|
||||
* Python list. We do need to tell it about all <T> types with %template,
|
||||
* however.
|
||||
*/
|
||||
%include <std_vector.i>
|
||||
%template(vectord) std::vector<double>;
|
||||
|
||||
|
||||
|
||||
%{
|
||||
#include "fir++.h"
|
||||
%}
|
||||
|
||||
|
||||
|
||||
%include "fir++.h"
|
||||
|
||||
// vim: ts=4:sw=4
|
||||
16
python/setup.py
Normal file
16
python/setup.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from distutils.core import setup, Extension
|
||||
|
||||
fir_module = Extension('_fir',
|
||||
sources=['pyfir_wrap.cxx'],
|
||||
libraries=['fir++'],
|
||||
)
|
||||
|
||||
setup(name = 'fir',
|
||||
version = '0.0.0',
|
||||
author = 'Laurence Withers',
|
||||
description = 'FIR filter',
|
||||
ext_modules = [fir_module],
|
||||
py_modules = ['fir'],
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue