aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--gensvm/core.py (renamed from gensvm/models.py)8
-rw-r--r--setup.py4
-rw-r--r--src/wrapper.pxd (renamed from src/pyx_gensvm.pxd)0
-rw-r--r--src/wrapper.pyx (renamed from src/pyx_gensvm.pyx)2
5 files changed, 8 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 8d8bb6c..ed25d69 100644
--- a/Makefile
+++ b/Makefile
@@ -41,7 +41,7 @@ cover: test ## Test unit test coverage using default nosetests
clean: ## Clean build dist and egg directories left after install
rm -rf ./dist ./build ./$(PACKAGE).egg-info
- rm -rf gensvm/pyx_gensvm*.so
+ rm -rf gensvm/*.so
rm -f MANIFEST
develop: ## Install a development version of the package needed for testing
diff --git a/gensvm/models.py b/gensvm/core.py
index f06374b..7594eba 100644
--- a/gensvm/models.py
+++ b/gensvm/core.py
@@ -15,7 +15,7 @@ from sklearn.utils import check_X_y, check_random_state
from sklearn.utils.multiclass import type_of_target
from sklearn.utils.validation import check_is_fitted
-from . import pyx_gensvm
+from . import wrapper
def _fit_gensvm(X, y, p, lmd, kappa, epsilon, weight_idx, kernel, gamma, coef,
@@ -25,10 +25,10 @@ def _fit_gensvm(X, y, p, lmd, kappa, epsilon, weight_idx, kernel, gamma, coef,
rnd = check_random_state(random_state)
# set the verbosity in GenSVM
- pyx_gensvm.set_verbosity_wrap(verbose)
+ wrapper.set_verbosity_wrap(verbose)
# run the actual training
- raw_coef_, n_SV_, n_iter_, training_error_, status_ = pyx_gensvm.train_wrap(
+ raw_coef_, n_SV_, n_iter_, training_error_, status_ = wrapper.train_wrap(
X, y, p, lmd, kappa, epsilon, weight_idx, kernel, gamma, coef,
degree, kernel_eigen_cutoff, max_iter,
rnd.randint(np.iinfo('i').max))
@@ -181,7 +181,7 @@ class GenSVM(BaseEstimator):
check_is_fitted(self, "coef_")
V = np.vstack((self.intercept_, self.coef_))
- predictions = pyx_gensvm.predict_wrap(X, V)
+ predictions = wrapper.predict_wrap(X, V)
# Transform the classes back to the original form
predictions -= 1
diff --git a/setup.py b/setup.py
index e9e223b..2962329 100644
--- a/setup.py
+++ b/setup.py
@@ -41,7 +41,7 @@ def configuration():
# Wrapper code in Cython uses the .pyx extension if we want to USE_CYTHON,
# otherwise it ends in .c. If you have more Cython code, you may want to
# extend this a bit
- wrapper = 'pyx_gensvm.pyx' if USE_CYTHON else 'pyx_gensvm.c'
+ wrapper = 'wrapper.pyx' if USE_CYTHON else 'wrapper.c'
# Sources include the C/Cython code from the wrapper and the source code of
# the C library
@@ -57,7 +57,7 @@ def configuration():
os.path.join('src', 'gensvm', 'gensvm_helper.c')
]
- config.add_extension('pyx_gensvm',
+ config.add_extension('wrapper',
sources=gensvm_sources,
libraries=cblas_libs,
include_dirs=[
diff --git a/src/pyx_gensvm.pxd b/src/wrapper.pxd
index be4d5f5..be4d5f5 100644
--- a/src/pyx_gensvm.pxd
+++ b/src/wrapper.pxd
diff --git a/src/pyx_gensvm.pyx b/src/wrapper.pyx
index 394d4ca..1d84b59 100644
--- a/src/pyx_gensvm.pyx
+++ b/src/wrapper.pyx
@@ -14,7 +14,7 @@ from __future__ import print_function
import numpy as np
cimport numpy as np
-cimport pyx_gensvm
+cimport wrapper
np.import_array()