diff --git a/.travis.yml b/.travis.yml index 3d6cd257b2554417dcfe252aae0da229336e0640..3c5a4ebe8ab3a9b9d0fefb1dc52ff6f6893f6f6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,8 +25,8 @@ install: - "python bootstrap.py" - "CFLAGS=-coverage ./bin/buildout" script: - - "./bin/python -c 'from xbob.learn.activation import get_config; print(get_config())'" - - "./bin/coverage run --source=xbob.learn.activation ./bin/nosetests -sv" + - "./bin/python -c 'from bob.learn.activation import get_config; print(get_config())'" + - "./bin/coverage run --source=bob.learn.activation ./bin/nosetests -sv" - "./bin/sphinx-build -b doctest doc sphinx" - "./bin/sphinx-build -b html doc sphinx" after_success: diff --git a/MANIFEST.in b/MANIFEST.in index 556c49dbd97387e4adc7bb046457e0c084788481..bd595a52b9f473dc931f5f798916891017f24d4f 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,3 @@ include LICENSE README.rst bootstrap.py buildout.cfg recursive-include doc conf.py *.rst -recursive-include xbob/learn/activation *.cpp *.h +recursive-include bob/learn/activation *.cpp *.h diff --git a/README.rst b/README.rst index 12d8897c42c608078b972835a6da5080cd9bb63d..c575f81768afece5962243efd0dfaccdf6bbcdda 100644 --- a/README.rst +++ b/README.rst @@ -2,16 +2,16 @@ .. Andre Anjos <andre.anjos@idiap.ch> .. Fri 13 Dec 2013 12:35:22 CET -.. image:: https://travis-ci.org/bioidiap/xbob.learn.activation.svg?branch=master - :target: https://travis-ci.org/bioidiap/xbob.learn.activation -.. image:: https://coveralls.io/repos/bioidiap/xbob.learn.activation/badge.png - :target: https://coveralls.io/r/bioidiap/xbob.learn.activation -.. image:: http://img.shields.io/github/tag/bioidiap/xbob.learn.activation.png - :target: https://github.com/bioidiap/xbob.learn.activation -.. image:: http://img.shields.io/pypi/v/xbob.learn.activation.png - :target: https://pypi.python.org/pypi/xbob.learn.activation -.. image:: http://img.shields.io/pypi/dm/xbob.learn.activation.png - :target: https://pypi.python.org/pypi/xbob.learn.activation +.. image:: https://travis-ci.org/bioidiap/bob.learn.activation.svg?branch=master + :target: https://travis-ci.org/bioidiap/bob.learn.activation +.. image:: https://coveralls.io/repos/bioidiap/bob.learn.activation/badge.png + :target: https://coveralls.io/r/bioidiap/bob.learn.activation +.. image:: http://img.shields.io/github/tag/bioidiap/bob.learn.activation.png + :target: https://github.com/bioidiap/bob.learn.activation +.. image:: http://img.shields.io/pypi/v/bob.learn.activation.png + :target: https://pypi.python.org/pypi/bob.learn.activation +.. image:: http://img.shields.io/pypi/dm/bob.learn.activation.png + :target: https://pypi.python.org/pypi/bob.learn.activation ======================================================= Python bindings for bob.machine's Activation functors @@ -42,7 +42,7 @@ Testing You can run a set of tests using the nose test runner:: - $ nosetests -sv xbob.learn.activation + $ nosetests -sv bob.learn.activation .. warning:: @@ -59,7 +59,7 @@ You can run our documentation tests using sphinx itself:: You can test overall test coverage with:: - $ nosetests --with-coverage --cover-package=xbob.learn.activation + $ nosetests --with-coverage --cover-package=bob.learn.activation The ``coverage`` egg must be installed for this to work properly. diff --git a/xbob/__init__.py b/bob/__init__.py similarity index 100% rename from xbob/__init__.py rename to bob/__init__.py diff --git a/xbob/learn/__init__.py b/bob/learn/__init__.py similarity index 100% rename from xbob/learn/__init__.py rename to bob/learn/__init__.py diff --git a/xbob/learn/activation/__init__.py b/bob/learn/activation/__init__.py similarity index 100% rename from xbob/learn/activation/__init__.py rename to bob/learn/activation/__init__.py diff --git a/xbob/learn/activation/activation.cpp b/bob/learn/activation/activation.cpp similarity index 98% rename from xbob/learn/activation/activation.cpp rename to bob/learn/activation/activation.cpp index 88042cec5646231bac53fbacd2f0c7b91467951b..6eef2f362eb0de849b6038d7b86ecc06fe15da64 100644 --- a/xbob/learn/activation/activation.cpp +++ b/bob/learn/activation/activation.cpp @@ -7,11 +7,11 @@ * Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland */ -#define XBOB_LEARN_ACTIVATION_MODULE -#include <xbob.learn.activation/api.h> -#include <xbob.io.base/api.h> -#include <xbob.blitz/cppapi.h> -#include <xbob.blitz/cleanup.h> +#define BOB_LEARN_ACTIVATION_MODULE +#include <bob.learn.activation/api.h> +#include <bob.io.base/api.h> +#include <bob.blitz/cppapi.h> +#include <bob.blitz/cleanup.h> #include <bob/machine/Activation.h> #include <boost/bind.hpp> #include <boost/function.hpp> @@ -21,7 +21,7 @@ * Implementation of Activation base class * *******************************************/ -PyDoc_STRVAR(s_activation_str, XBOB_EXT_MODULE_PREFIX ".Activation"); +PyDoc_STRVAR(s_activation_str, BOB_EXT_MODULE_PREFIX ".Activation"); PyDoc_STRVAR(s_activation_doc, "Base class for activation functors.\n\ @@ -429,7 +429,7 @@ PyDoc_STRVAR(s_load_str, "load"); PyDoc_STRVAR(s_load_doc, "o.load(f) -> None\n\ \n\ -Loads itself from a :py:class:`xbob.io.HDF5File`\n\ +Loads itself from a :py:class:`bob.io.HDF5File`\n\ \n\ "); @@ -463,7 +463,7 @@ PyDoc_STRVAR(s_save_str, "save"); PyDoc_STRVAR(s_save_doc, "o.save(f) -> None\n\ \n\ -Saves itself to a :py:class:`xbob.io.HDF5File`\n\ +Saves itself to a :py:class:`bob.io.HDF5File`\n\ \n\ "); diff --git a/xbob/learn/activation/identity.cpp b/bob/learn/activation/identity.cpp similarity index 97% rename from xbob/learn/activation/identity.cpp rename to bob/learn/activation/identity.cpp index 87bfd0739fa6d5eb1ccdd418c48bbeb8428cbeaa..bc640ee61023ff8309c365ff9f42d123a5cf8708 100644 --- a/xbob/learn/activation/identity.cpp +++ b/bob/learn/activation/identity.cpp @@ -5,11 +5,11 @@ * @brief Implementation of the Identity Activation function */ -#define XBOB_LEARN_ACTIVATION_MODULE -#include <xbob.learn.activation/api.h> +#define BOB_LEARN_ACTIVATION_MODULE +#include <bob.learn.activation/api.h> PyDoc_STRVAR(s_identityactivation_str, - XBOB_EXT_MODULE_PREFIX ".Identity"); + BOB_EXT_MODULE_PREFIX ".Identity"); PyDoc_STRVAR(s_identityactivation_doc, "Identity() -> new Identity activation functor\n\ diff --git a/xbob/learn/activation/include/xbob.learn.activation/api.h b/bob/learn/activation/include/bob.learn.activation/api.h similarity index 64% rename from xbob/learn/activation/include/xbob.learn.activation/api.h rename to bob/learn/activation/include/bob.learn.activation/api.h index 3e9703ee8deab2dbc3e1fb1791e4b2598f0a80e6..79c0814cf39ad2e7f87a0835fe5b02190d2dcc82 100644 --- a/xbob/learn/activation/include/xbob.learn.activation/api.h +++ b/bob/learn/activation/include/bob.learn.activation/api.h @@ -5,16 +5,16 @@ * @brief C/C++ Python API for activation functors in bob::machine */ -#ifndef XBOB_LEARN_ACTIVATION_H -#define XBOB_LEARN_ACTIVATION_H +#ifndef BOB_LEARN_ACTIVATION_H +#define BOB_LEARN_ACTIVATION_H #include <Python.h> -#include <xbob.learn.activation/config.h> +#include <bob.learn.activation/config.h> #include <bob/machine/Activation.h> #include <bob/machine/LinearMachine.h> -#define XBOB_LEARN_ACTIVATION_MODULE_PREFIX xbob.learn.activation -#define XBOB_LEARN_ACTIVATION_MODULE_NAME _library +#define BOB_LEARN_ACTIVATION_MODULE_PREFIX bob.learn.activation +#define BOB_LEARN_ACTIVATION_MODULE_NAME _library /******************* * C API functions * @@ -22,33 +22,33 @@ /* Enum defining entries in the function table */ enum _PyBobLearnActivation_ENUM{ - PyXbobLearnActivation_APIVersion_NUM = 0, - // Bindings for xbob.learn.activation.Activation + PyBobLearnActivation_APIVersion_NUM = 0, + // Bindings for bob.learn.activation.Activation PyBobLearnActivation_Type_NUM, PyBobLearnActivation_Check_NUM, PyBobLearnActivation_NewFromActivation_NUM, - // Bindings for xbob.learn.activation.Identity + // Bindings for bob.learn.activation.Identity PyBobLearnIdentityActivation_Type_NUM, - // Bindings for xbob.learn.activation.Linear + // Bindings for bob.learn.activation.Linear PyBobLearnLinearActivation_Type_NUM, - // Bindings for xbob.learn.activation.Logistic + // Bindings for bob.learn.activation.Logistic PyBobLearnLogisticActivation_Type_NUM, - // Bindings for xbob.learn.activation.HyperbolicTangent + // Bindings for bob.learn.activation.HyperbolicTangent PyBobLearnHyperbolicTangentActivation_Type_NUM, - // Bindings for xbob.learn.activation.MultipliedHyperbolicTangent + // Bindings for bob.learn.activation.MultipliedHyperbolicTangent PyBobLearnMultipliedHyperbolicTangentActivation_Type_NUM, // Total number of C API pointers - PyXbobLearnActivation_API_pointers + PyBobLearnActivation_API_pointers }; /************** * Versioning * **************/ -#define PyXbobLearnActivation_APIVersion_TYPE int +#define PyBobLearnActivation_APIVersion_TYPE int /************************************************* - * Bindings for xbob.learn.activation.Activation * + * Bindings for bob.learn.activation.Activation * *************************************************/ typedef struct { @@ -65,7 +65,7 @@ typedef struct { #define PyBobLearnActivation_NewFromActivation_PROTO (boost::shared_ptr<bob::machine::Activation> a) /*********************************************** - * Bindings for xbob.learn.activation.Identity * + * Bindings for bob.learn.activation.Identity * ***********************************************/ typedef struct { @@ -76,7 +76,7 @@ typedef struct { #define PyBobLearnIdentityActivation_Type_TYPE PyTypeObject /********************************************* - * Bindings for xbob.learn.activation.Linear * + * Bindings for bob.learn.activation.Linear * *********************************************/ typedef struct { @@ -87,7 +87,7 @@ typedef struct { #define PyBobLearnLinearActivation_Type_TYPE PyTypeObject /*********************************************** - * Bindings for xbob.learn.activation.Logistic * + * Bindings for bob.learn.activation.Logistic * ***********************************************/ typedef struct { @@ -98,7 +98,7 @@ typedef struct { #define PyBobLearnLogisticActivation_Type_TYPE PyTypeObject /******************************************************** - * Bindings for xbob.learn.activation.HyperbolicTangent * + * Bindings for bob.learn.activation.HyperbolicTangent * ********************************************************/ typedef struct { @@ -109,7 +109,7 @@ typedef struct { #define PyBobLearnHyperbolicTangentActivation_Type_TYPE PyTypeObject /****************************************************************** - * Bindings for xbob.learn.activation.MultipliedHyperbolicTangent * + * Bindings for bob.learn.activation.MultipliedHyperbolicTangent * ******************************************************************/ typedef struct { @@ -120,18 +120,18 @@ typedef struct { #define PyBobLearnMultipliedHyperbolicTangentActivation_Type_TYPE PyTypeObject -#ifdef XBOB_LEARN_ACTIVATION_MODULE +#ifdef BOB_LEARN_ACTIVATION_MODULE - /* This section is used when compiling `xbob.learn.activation' itself */ + /* This section is used when compiling `bob.learn.activation' itself */ /************** * Versioning * **************/ - extern int PyXbobLearnActivation_APIVersion; + extern int PyBobLearnActivation_APIVersion; /************************************************* - * Bindings for xbob.learn.activation.Activation * + * Bindings for bob.learn.activation.Activation * *************************************************/ extern PyBobLearnActivation_Type_TYPE PyBobLearnActivation_Type; @@ -141,38 +141,38 @@ typedef struct { PyBobLearnActivation_NewFromActivation_RET PyBobLearnActivation_NewFromActivation PyBobLearnActivation_NewFromActivation_PROTO; /*********************************************** - * Bindings for xbob.learn.activation.Identity * + * Bindings for bob.learn.activation.Identity * ***********************************************/ extern PyBobLearnIdentityActivation_Type_TYPE PyBobLearnIdentityActivation_Type; /********************************************* - * Bindings for xbob.learn.activation.Linear * + * Bindings for bob.learn.activation.Linear * *********************************************/ extern PyBobLearnLinearActivation_Type_TYPE PyBobLearnLinearActivation_Type; /*********************************************** - * Bindings for xbob.learn.activation.Logistic * + * Bindings for bob.learn.activation.Logistic * ***********************************************/ extern PyBobLearnLogisticActivation_Type_TYPE PyBobLearnLogisticActivation_Type; /******************************************************** - * Bindings for xbob.learn.activation.HyperbolicTangent * + * Bindings for bob.learn.activation.HyperbolicTangent * ********************************************************/ extern PyBobLearnHyperbolicTangentActivation_Type_TYPE PyBobLearnHyperbolicTangentActivation_Type; /****************************************************************** - * Bindings for xbob.learn.activation.MultipliedHyperbolicTangent * + * Bindings for bob.learn.activation.MultipliedHyperbolicTangent * ******************************************************************/ extern PyBobLearnMultipliedHyperbolicTangentActivation_Type_TYPE PyBobLearnMultipliedHyperbolicTangentActivation_Type; #else - /* This section is used in modules that use `xbob.learn.activation's' C-API */ + /* This section is used in modules that use `bob.learn.activation's' C-API */ /************************************************************************ * Macros to avoid symbol collision and allow for separate compilation. * @@ -181,18 +181,18 @@ typedef struct { ************************************************************************/ # if defined(PY_ARRAY_UNIQUE_SYMBOL) -# define XBOB_LEARN_ACTIVATION_MAKE_API_NAME_INNER(a) XBOB_LEARN_ACTIVATION_ ## a -# define XBOB_LEARN_ACTIVATION_MAKE_API_NAME(a) XBOB_LEARN_ACTIVATION_MAKE_API_NAME_INNER(a) -# define PyXbobLearnActivation_API XBOB_LEARN_ACTIVATION_MAKE_API_NAME(PY_ARRAY_UNIQUE_SYMBOL) +# define BOB_LEARN_ACTIVATION_MAKE_API_NAME_INNER(a) BOB_LEARN_ACTIVATION_ ## a +# define BOB_LEARN_ACTIVATION_MAKE_API_NAME(a) BOB_LEARN_ACTIVATION_MAKE_API_NAME_INNER(a) +# define PyBobLearnActivation_API BOB_LEARN_ACTIVATION_MAKE_API_NAME(PY_ARRAY_UNIQUE_SYMBOL) # endif # if defined(NO_IMPORT_ARRAY) - extern void **PyXbobLearnActivation_API; + extern void **PyBobLearnActivation_API; # else # if defined(PY_ARRAY_UNIQUE_SYMBOL) - void **PyXbobLearnActivation_API; + void **PyBobLearnActivation_API; # else - static void **PyXbobLearnActivation_API=NULL; + static void **PyBobLearnActivation_API=NULL; # endif # endif @@ -200,47 +200,47 @@ typedef struct { * Versioning * **************/ -# define PyXbobLearnActivation_APIVersion (*(PyXbobLearnActivation_APIVersion_TYPE *)PyXbobLearnActivation_API[PyXbobLearnActivation_APIVersion_NUM]) +# define PyBobLearnActivation_APIVersion (*(PyBobLearnActivation_APIVersion_TYPE *)PyBobLearnActivation_API[PyBobLearnActivation_APIVersion_NUM]) /************************************************* - * Bindings for xbob.learn.activation.Activation * + * Bindings for bob.learn.activation.Activation * *************************************************/ -# define PyBobLearnActivation_Type (*(PyBobLearnActivation_Type_TYPE *)PyXbobLearnActivation_API[PyBobLearnActivation_Type_NUM]) +# define PyBobLearnActivation_Type (*(PyBobLearnActivation_Type_TYPE *)PyBobLearnActivation_API[PyBobLearnActivation_Type_NUM]) -# define PyBobLearnActivation_Check (*(PyBobLearnActivation_Check_RET (*)PyBobLearnActivation_Check_PROTO) PyXbobLearnActivation_API[PyBobLearnActivation_Check_NUM]) +# define PyBobLearnActivation_Check (*(PyBobLearnActivation_Check_RET (*)PyBobLearnActivation_Check_PROTO) PyBobLearnActivation_API[PyBobLearnActivation_Check_NUM]) -# define PyBobLearnActivation_NewFromActivation (*(PyBobLearnActivation_NewFromActivation_RET (*)PyBobLearnActivation_NewFromActivation_PROTO) PyXbobLearnActivation_API[PyBobLearnActivation_NewFromActivation_NUM]) +# define PyBobLearnActivation_NewFromActivation (*(PyBobLearnActivation_NewFromActivation_RET (*)PyBobLearnActivation_NewFromActivation_PROTO) PyBobLearnActivation_API[PyBobLearnActivation_NewFromActivation_NUM]) /*********************************************** - * Bindings for xbob.learn.activation.Identity * + * Bindings for bob.learn.activation.Identity * ***********************************************/ -# define PyBobLearnIdentityActivation_Type (*(PyBobLearnIdentityActivation_Type_TYPE *)PyXbobLearnActivation_API[PyBobLearnIdentityActivation_Type_NUM]) +# define PyBobLearnIdentityActivation_Type (*(PyBobLearnIdentityActivation_Type_TYPE *)PyBobLearnActivation_API[PyBobLearnIdentityActivation_Type_NUM]) /********************************************* - * Bindings for xbob.learn.activation.Linear * + * Bindings for bob.learn.activation.Linear * *********************************************/ -# define PyBobLearnLinearActivation_Type (*(PyBobLearnLinearActivation_Type_TYPE *)PyXbobLearnActivation_API[PyBobLearnLinearActivation_Type_NUM]) +# define PyBobLearnLinearActivation_Type (*(PyBobLearnLinearActivation_Type_TYPE *)PyBobLearnActivation_API[PyBobLearnLinearActivation_Type_NUM]) /*********************************************** - * Bindings for xbob.learn.activation.Logistic * + * Bindings for bob.learn.activation.Logistic * ***********************************************/ -# define PyBobLearnLogisticActivation_Type (*(PyBobLearnLogisticActivation_Type_TYPE *)PyXbobLearnActivation_API[PyBobLearnLogisticActivation_Type_NUM]) +# define PyBobLearnLogisticActivation_Type (*(PyBobLearnLogisticActivation_Type_TYPE *)PyBobLearnActivation_API[PyBobLearnLogisticActivation_Type_NUM]) /******************************************************** - * Bindings for xbob.learn.activation.HyperbolicTangent * + * Bindings for bob.learn.activation.HyperbolicTangent * ********************************************************/ -# define PyBobLearnHyperbolicTangentActivation_Type (*(PyBobLearnHyperbolicTangentActivation_Type_TYPE *)PyXbobLearnActivation_API[PyBobLearnHyperbolicTangentActivation_Type_NUM]) +# define PyBobLearnHyperbolicTangentActivation_Type (*(PyBobLearnHyperbolicTangentActivation_Type_TYPE *)PyBobLearnActivation_API[PyBobLearnHyperbolicTangentActivation_Type_NUM]) /****************************************************************** - * Bindings for xbob.learn.activation.MultipliedHyperbolicTangent * + * Bindings for bob.learn.activation.MultipliedHyperbolicTangent * ******************************************************************/ -# define PyBobLearnMultipliedHyperbolicTangentActivation_Type (*(PyBobLearnMultipliedHyperbolicTangentActivation_Type_TYPE *)PyXbobLearnActivation_API[PyBobLearnMultipliedHyperbolicTangentActivation_Type_NUM]) +# define PyBobLearnMultipliedHyperbolicTangentActivation_Type (*(PyBobLearnMultipliedHyperbolicTangentActivation_Type_TYPE *)PyBobLearnActivation_API[PyBobLearnMultipliedHyperbolicTangentActivation_Type_NUM]) # if !defined(NO_IMPORT_ARRAY) @@ -248,12 +248,12 @@ typedef struct { * Returns -1 on error, 0 on success. PyCapsule_Import will set an exception * if there's an error. */ - static int import_xbob_learn_activation(void) { + static int import_bob_learn_activation(void) { PyObject *c_api_object; PyObject *module; - module = PyImport_ImportModule(BOOST_PP_STRINGIZE(XBOB_LEARN_ACTIVATION_MODULE_PREFIX) "." BOOST_PP_STRINGIZE(XBOB_LEARN_ACTIVATION_MODULE_NAME)); + module = PyImport_ImportModule(BOOST_PP_STRINGIZE(BOB_LEARN_ACTIVATION_MODULE_PREFIX) "." BOOST_PP_STRINGIZE(BOB_LEARN_ACTIVATION_MODULE_NAME)); if (module == NULL) return -1; @@ -266,35 +266,35 @@ typedef struct { # if PY_VERSION_HEX >= 0x02070000 if (PyCapsule_CheckExact(c_api_object)) { - PyXbobLearnActivation_API = (void **)PyCapsule_GetPointer(c_api_object, + PyBobLearnActivation_API = (void **)PyCapsule_GetPointer(c_api_object, PyCapsule_GetName(c_api_object)); } # else if (PyCObject_Check(c_api_object)) { - PyXbobLearnActivation_API = (void **)PyCObject_AsVoidPtr(c_api_object); + PyBobLearnActivation_API = (void **)PyCObject_AsVoidPtr(c_api_object); } # endif Py_DECREF(c_api_object); Py_DECREF(module); - if (!PyXbobLearnActivation_API) { + if (!PyBobLearnActivation_API) { PyErr_Format(PyExc_ImportError, # if PY_VERSION_HEX >= 0x02070000 "cannot find C/C++ API capsule at `%s.%s._C_API'", # else "cannot find C/C++ API cobject at `%s.%s._C_API'", # endif - BOOST_PP_STRINGIZE(XBOB_LEARN_ACTIVATION_MODULE_PREFIX), - BOOST_PP_STRINGIZE(XBOB_LEARN_ACTIVATION_MODULE_NAME)); + BOOST_PP_STRINGIZE(BOB_LEARN_ACTIVATION_MODULE_PREFIX), + BOOST_PP_STRINGIZE(BOB_LEARN_ACTIVATION_MODULE_NAME)); return -1; } /* Checks that the imported version matches the compiled version */ - int imported_version = *(int*)PyXbobLearnActivation_API[PyXbobLearnActivation_APIVersion_NUM]; + int imported_version = *(int*)PyBobLearnActivation_API[PyBobLearnActivation_APIVersion_NUM]; - if (XBOB_LEARN_ACTIVATION_API_VERSION != imported_version) { - PyErr_Format(PyExc_ImportError, "%s.%s import error: you compiled against API version 0x%04x, but are now importing an API with version 0x%04x which is not compatible - check your Python runtime environment for errors", BOOST_PP_STRINGIZE(XBOB_LEARN_ACTIVATION_MODULE_PREFIX), BOOST_PP_STRINGIZE(XBOB_LEARN_ACTIVATION_MODULE_NAME), XBOB_LEARN_ACTIVATION_API_VERSION, imported_version); + if (BOB_LEARN_ACTIVATION_API_VERSION != imported_version) { + PyErr_Format(PyExc_ImportError, "%s.%s import error: you compiled against API version 0x%04x, but are now importing an API with version 0x%04x which is not compatible - check your Python runtime environment for errors", BOOST_PP_STRINGIZE(BOB_LEARN_ACTIVATION_MODULE_PREFIX), BOOST_PP_STRINGIZE(BOB_LEARN_ACTIVATION_MODULE_NAME), BOB_LEARN_ACTIVATION_API_VERSION, imported_version); return -1; } @@ -305,6 +305,6 @@ typedef struct { # endif //!defined(NO_IMPORT_ARRAY) -#endif /* XBOB_LEARN_ACTIVATION_MODULE */ +#endif /* BOB_LEARN_ACTIVATION_MODULE */ -#endif /* XBOB_LEARN_ACTIVATION_H */ +#endif /* BOB_LEARN_ACTIVATION_H */ diff --git a/bob/learn/activation/include/bob.learn.activation/config.h b/bob/learn/activation/include/bob.learn.activation/config.h new file mode 100644 index 0000000000000000000000000000000000000000..30f27625a8d750165abb65e1d6647f2d0e3cc558 --- /dev/null +++ b/bob/learn/activation/include/bob.learn.activation/config.h @@ -0,0 +1,14 @@ +/** + * @author Andre Anjos <andre.anjos@idiap.ch> + * @date Fri 13 Dec 2013 11:50:29 CET + * + * @brief General directives for all modules in bob.learn.activation + */ + +#ifndef BOB_LEARN_ACTIVATION_CONFIG_H +#define BOB_LEARN_ACTIVATION_CONFIG_H + +/* Macros that define versions and important names */ +#define BOB_LEARN_ACTIVATION_API_VERSION 0x0200 + +#endif /* BOB_LEARN_ACTIVATION_CONFIG_H */ diff --git a/xbob/learn/activation/linear.cpp b/bob/learn/activation/linear.cpp similarity index 96% rename from xbob/learn/activation/linear.cpp rename to bob/learn/activation/linear.cpp index 942570db2091c15ff4ed21001e8fd37eb15f3d6a..f801cbac4619bbffeb40c41cb49f74b8b4c039df 100644 --- a/xbob/learn/activation/linear.cpp +++ b/bob/learn/activation/linear.cpp @@ -5,10 +5,10 @@ * @brief Implementation of the Linear Activation function */ -#define XBOB_LEARN_ACTIVATION_MODULE -#include <xbob.learn.activation/api.h> +#define BOB_LEARN_ACTIVATION_MODULE +#include <bob.learn.activation/api.h> -PyDoc_STRVAR(s_linearactivation_str, XBOB_EXT_MODULE_PREFIX ".Linear"); +PyDoc_STRVAR(s_linearactivation_str, BOB_EXT_MODULE_PREFIX ".Linear"); PyDoc_STRVAR(s_linearactivation_doc, "Linear([C=1.0]) -> new linear activation functor\n\ diff --git a/xbob/learn/activation/logistic.cpp b/bob/learn/activation/logistic.cpp similarity index 96% rename from xbob/learn/activation/logistic.cpp rename to bob/learn/activation/logistic.cpp index b59e83fa379125723038bad1b9ed26b8a17d7cec..2ae82d43516b1935ae35fcd57b06a652616e6f4b 100644 --- a/xbob/learn/activation/logistic.cpp +++ b/bob/learn/activation/logistic.cpp @@ -5,10 +5,10 @@ * @brief Implementation of the Logistic Activation function */ -#define XBOB_LEARN_ACTIVATION_MODULE -#include <xbob.learn.activation/api.h> +#define BOB_LEARN_ACTIVATION_MODULE +#include <bob.learn.activation/api.h> -PyDoc_STRVAR(s_logisticactivation_str, XBOB_EXT_MODULE_PREFIX ".Logistic"); +PyDoc_STRVAR(s_logisticactivation_str, BOB_EXT_MODULE_PREFIX ".Logistic"); PyDoc_STRVAR(s_logisticactivation_doc, "Logistic() -> new Logistic activation functor\n\ diff --git a/xbob/learn/activation/main.cpp b/bob/learn/activation/main.cpp similarity index 60% rename from xbob/learn/activation/main.cpp rename to bob/learn/activation/main.cpp index a6b8184d2626569beb1d3b5ac3f3b239d7ea547d..a5a5a8b839a8cfe3e9fa567a570204914debc951 100644 --- a/xbob/learn/activation/main.cpp +++ b/bob/learn/activation/main.cpp @@ -5,15 +5,15 @@ * @brief Bindings to activation functors */ -#define XBOB_LEARN_ACTIVATION_MODULE -#include <xbob.learn.activation/api.h> +#define BOB_LEARN_ACTIVATION_MODULE +#include <bob.learn.activation/api.h> #ifdef NO_IMPORT_ARRAY #undef NO_IMPORT_ARRAY #endif -#include <xbob.blitz/capi.h> -#include <xbob.blitz/cleanup.h> -#include <xbob.io.base/api.h> +#include <bob.blitz/capi.h> +#include <bob.blitz/cleanup.h> +#include <bob.io.base/api.h> static PyMethodDef module_methods[] = { {0} /* Sentinel */ @@ -24,7 +24,7 @@ PyDoc_STRVAR(module_docstr, "classes for activation functors"); #if PY_VERSION_HEX >= 0x03000000 static PyModuleDef module_definition = { PyModuleDef_HEAD_INIT, - XBOB_EXT_MODULE_NAME, + BOB_EXT_MODULE_NAME, module_docstr, -1, module_methods, @@ -32,7 +32,7 @@ static PyModuleDef module_definition = { }; #endif -int PyXbobLearnActivation_APIVersion = XBOB_LEARN_ACTIVATION_API_VERSION; +int PyBobLearnActivation_APIVersion = BOB_LEARN_ACTIVATION_API_VERSION; static PyObject* create_module (void) { @@ -60,14 +60,14 @@ static PyObject* create_module (void) { # if PY_VERSION_HEX >= 0x03000000 PyObject* m = PyModule_Create(&module_definition); # else - PyObject* m = Py_InitModule3(XBOB_EXT_MODULE_NAME, module_methods, module_docstr); + PyObject* m = Py_InitModule3(BOB_EXT_MODULE_NAME, module_methods, module_docstr); # endif if (!m) return 0; auto m_ = make_safe(m); /* register some constants */ - if (PyModule_AddIntConstant(m, "__api_version__", XBOB_LEARN_ACTIVATION_API_VERSION) < 0) return 0; - if (PyModule_AddStringConstant(m, "__version__", XBOB_EXT_MODULE_VERSION) < 0) return 0; + if (PyModule_AddIntConstant(m, "__api_version__", BOB_LEARN_ACTIVATION_API_VERSION) < 0) return 0; + if (PyModule_AddStringConstant(m, "__version__", BOB_EXT_MODULE_VERSION) < 0) return 0; /* register the types to python */ Py_INCREF(&PyBobLearnActivation_Type); @@ -88,7 +88,7 @@ static PyObject* create_module (void) { Py_INCREF(&PyBobLearnMultipliedHyperbolicTangentActivation_Type); if (PyModule_AddObject(m, "MultipliedHyperbolicTangent", (PyObject *)&PyBobLearnMultipliedHyperbolicTangentActivation_Type) < 0) return 0; - static void* PyXbobLearnActivation_API[PyXbobLearnActivation_API_pointers]; + static void* PyBobLearnActivation_API[PyBobLearnActivation_API_pointers]; /* exhaustive list of C APIs */ @@ -96,73 +96,73 @@ static PyObject* create_module (void) { * Versioning * **************/ - PyXbobLearnActivation_API[PyXbobLearnActivation_APIVersion_NUM] = (void *)&PyXbobLearnActivation_APIVersion; + PyBobLearnActivation_API[PyBobLearnActivation_APIVersion_NUM] = (void *)&PyBobLearnActivation_APIVersion; /************************************************* - * Bindings for xbob.learn.activation.Activation * + * Bindings for bob.learn.activation.Activation * *************************************************/ - PyXbobLearnActivation_API[PyBobLearnActivation_Type_NUM] = (void *)&PyBobLearnActivation_Type; + PyBobLearnActivation_API[PyBobLearnActivation_Type_NUM] = (void *)&PyBobLearnActivation_Type; - PyXbobLearnActivation_API[PyBobLearnActivation_Check_NUM] = (void *)&PyBobLearnActivation_Check; + PyBobLearnActivation_API[PyBobLearnActivation_Check_NUM] = (void *)&PyBobLearnActivation_Check; - PyXbobLearnActivation_API[PyBobLearnActivation_NewFromActivation_NUM] = (void *)&PyBobLearnActivation_NewFromActivation; + PyBobLearnActivation_API[PyBobLearnActivation_NewFromActivation_NUM] = (void *)&PyBobLearnActivation_NewFromActivation; /*********************************************** - * Bindings for xbob.learn.activation.Identity * + * Bindings for bob.learn.activation.Identity * ***********************************************/ - PyXbobLearnActivation_API[PyBobLearnIdentityActivation_Type_NUM] = (void *)&PyBobLearnIdentityActivation_Type; + PyBobLearnActivation_API[PyBobLearnIdentityActivation_Type_NUM] = (void *)&PyBobLearnIdentityActivation_Type; /********************************************* - * Bindings for xbob.learn.activation.Linear * + * Bindings for bob.learn.activation.Linear * *********************************************/ - PyXbobLearnActivation_API[PyBobLearnLinearActivation_Type_NUM] = (void *)&PyBobLearnLinearActivation_Type; + PyBobLearnActivation_API[PyBobLearnLinearActivation_Type_NUM] = (void *)&PyBobLearnLinearActivation_Type; /*********************************************** - * Bindings for xbob.learn.activation.Logistic * + * Bindings for bob.learn.activation.Logistic * ***********************************************/ - PyXbobLearnActivation_API[PyBobLearnLogisticActivation_Type_NUM] = (void *)&PyBobLearnLogisticActivation_Type; + PyBobLearnActivation_API[PyBobLearnLogisticActivation_Type_NUM] = (void *)&PyBobLearnLogisticActivation_Type; /******************************************************** - * Bindings for xbob.learn.activation.HyperbolicTangent * + * Bindings for bob.learn.activation.HyperbolicTangent * ********************************************************/ - PyXbobLearnActivation_API[PyBobLearnHyperbolicTangentActivation_Type_NUM] = (void *)&PyBobLearnHyperbolicTangentActivation_Type; + PyBobLearnActivation_API[PyBobLearnHyperbolicTangentActivation_Type_NUM] = (void *)&PyBobLearnHyperbolicTangentActivation_Type; /****************************************************************** - * Bindings for xbob.learn.activation.MultipliedHyperbolicTangent * + * Bindings for bob.learn.activation.MultipliedHyperbolicTangent * ******************************************************************/ - PyXbobLearnActivation_API[PyBobLearnMultipliedHyperbolicTangentActivation_Type_NUM] = (void *)&PyBobLearnMultipliedHyperbolicTangentActivation_Type; + PyBobLearnActivation_API[PyBobLearnMultipliedHyperbolicTangentActivation_Type_NUM] = (void *)&PyBobLearnMultipliedHyperbolicTangentActivation_Type; #if PY_VERSION_HEX >= 0x02070000 /* defines the PyCapsule */ - PyObject* c_api_object = PyCapsule_New((void *)PyXbobLearnActivation_API, - XBOB_EXT_MODULE_PREFIX "." XBOB_EXT_MODULE_NAME "._C_API", 0); + PyObject* c_api_object = PyCapsule_New((void *)PyBobLearnActivation_API, + BOB_EXT_MODULE_PREFIX "." BOB_EXT_MODULE_NAME "._C_API", 0); #else - PyObject* c_api_object = PyCObject_FromVoidPtr((void *)PyXbobLearnActivation_API, 0); + PyObject* c_api_object = PyCObject_FromVoidPtr((void *)PyBobLearnActivation_API, 0); #endif if (c_api_object) PyModule_AddObject(m, "_C_API", c_api_object); /* imports dependencies */ - if (import_xbob_blitz() < 0) { + if (import_bob_blitz() < 0) { PyErr_Print(); - PyErr_Format(PyExc_ImportError, "cannot import `%s'", XBOB_EXT_MODULE_NAME); + PyErr_Format(PyExc_ImportError, "cannot import `%s'", BOB_EXT_MODULE_NAME); return 0; } - if (import_xbob_io_base() < 0) { + if (import_bob_io_base() < 0) { PyErr_Print(); - PyErr_Format(PyExc_ImportError, "cannot import `%s'", XBOB_EXT_MODULE_NAME); + PyErr_Format(PyExc_ImportError, "cannot import `%s'", BOB_EXT_MODULE_NAME); return 0; } @@ -171,7 +171,7 @@ static PyObject* create_module (void) { } -PyMODINIT_FUNC XBOB_EXT_ENTRY_NAME (void) { +PyMODINIT_FUNC BOB_EXT_ENTRY_NAME (void) { # if PY_VERSION_HEX >= 0x03000000 return # endif diff --git a/xbob/learn/activation/mult_tanh.cpp b/bob/learn/activation/mult_tanh.cpp similarity index 97% rename from xbob/learn/activation/mult_tanh.cpp rename to bob/learn/activation/mult_tanh.cpp index 0bad6120ba7a528f8ae3f5b8c7690c4474bcff81..90b92c280d9e8e2673864b9174eed358b668bda6 100644 --- a/xbob/learn/activation/mult_tanh.cpp +++ b/bob/learn/activation/mult_tanh.cpp @@ -5,11 +5,11 @@ * @brief Implementation of the MultipliedHyperbolicTangent Activation function */ -#define XBOB_LEARN_ACTIVATION_MODULE -#include <xbob.learn.activation/api.h> +#define BOB_LEARN_ACTIVATION_MODULE +#include <bob.learn.activation/api.h> PyDoc_STRVAR(s_multtanhactivation_str, - XBOB_EXT_MODULE_PREFIX ".MultipliedHyperbolicTangent"); + BOB_EXT_MODULE_PREFIX ".MultipliedHyperbolicTangent"); PyDoc_STRVAR(s_multtanhactivation_doc, "MultipliedHyperbolicTangentActivation([C=1.0, [M=1.0]]) -> new multiplied hyperbolic tangent functor\n\ diff --git a/xbob/learn/activation/tanh.cpp b/bob/learn/activation/tanh.cpp similarity index 96% rename from xbob/learn/activation/tanh.cpp rename to bob/learn/activation/tanh.cpp index db7239befe7eac62cf6dedcf44cd6538e9fde67d..2dc4e7221f7ffc92726956f78cd8ec3b031a4f36 100644 --- a/xbob/learn/activation/tanh.cpp +++ b/bob/learn/activation/tanh.cpp @@ -5,11 +5,11 @@ * @brief Implementation of the HyperbolicTangent Activation function */ -#define XBOB_LEARN_ACTIVATION_MODULE -#include <xbob.learn.activation/api.h> +#define BOB_LEARN_ACTIVATION_MODULE +#include <bob.learn.activation/api.h> PyDoc_STRVAR(s_hyperbolictangentactivation_str, - XBOB_EXT_MODULE_PREFIX ".HyperbolicTangentActivation"); + BOB_EXT_MODULE_PREFIX ".HyperbolicTangentActivation"); PyDoc_STRVAR(s_hyperbolictangentactivation_doc, "HyperbolicTangentActivation() -> new HyperbolicTangentActivation\n\ diff --git a/xbob/learn/activation/test.py b/bob/learn/activation/test.py similarity index 100% rename from xbob/learn/activation/test.py rename to bob/learn/activation/test.py diff --git a/xbob/learn/activation/version.cpp b/bob/learn/activation/version.cpp similarity index 79% rename from xbob/learn/activation/version.cpp rename to bob/learn/activation/version.cpp index 4af43aa0c60c360d57ea73b3c9799aa4025cdfa8..4609655a90a03e650213da745ead04acb4fb3de9 100644 --- a/xbob/learn/activation/version.cpp +++ b/bob/learn/activation/version.cpp @@ -19,10 +19,10 @@ #ifdef NO_IMPORT_ARRAY #undef NO_IMPORT_ARRAY #endif -#include <xbob.blitz/capi.h> -#include <xbob.blitz/cleanup.h> -#include <xbob.io.base/config.h> -#include <xbob.learn.activation/config.h> +#include <bob.blitz/capi.h> +#include <bob.blitz/cleanup.h> +#include <bob.io.base/config.h> +#include <bob.learn.activation/config.h> static int dict_set(PyObject* d, const char* key, const char* value) { PyObject* v = Py_BuildValue("s", value); @@ -98,17 +98,17 @@ static PyObject* numpy_version() { } /** - * xbob.blitz c/c++ api version + * bob.blitz c/c++ api version */ -static PyObject* xbob_blitz_version() { - return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(XBOB_BLITZ_API_VERSION)); +static PyObject* bob_blitz_version() { + return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(BOB_BLITZ_API_VERSION)); } /** - * xbob.io.base c/c++ api version + * bob.io.base c/c++ api version */ -static PyObject* xbob_io_base_version() { - return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(XBOB_IO_BASE_API_VERSION)); +static PyObject* bob_io_base_version() { + return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(BOB_IO_BASE_API_VERSION)); } static PyObject* build_version_dictionary() { @@ -122,8 +122,8 @@ static PyObject* build_version_dictionary() { if (!dict_steal(retval, "Compiler", compiler_version())) return 0; if (!dict_steal(retval, "Python", python_version())) return 0; if (!dict_steal(retval, "NumPy", numpy_version())) return 0; - if (!dict_steal(retval, "xbob.blitz", xbob_blitz_version())) return 0; - if (!dict_steal(retval, "xbob.io.base", xbob_io_base_version())) return 0; + if (!dict_steal(retval, "bob.blitz", bob_blitz_version())) return 0; + if (!dict_steal(retval, "bob.io.base", bob_io_base_version())) return 0; if (!dict_steal(retval, "Bob", bob_version())) return 0; Py_INCREF(retval); @@ -141,7 +141,7 @@ PyDoc_STRVAR(module_docstr, #if PY_VERSION_HEX >= 0x03000000 static PyModuleDef module_definition = { PyModuleDef_HEAD_INIT, - XBOB_EXT_MODULE_NAME, + BOB_EXT_MODULE_NAME, module_docstr, -1, module_methods, @@ -154,15 +154,15 @@ static PyObject* create_module (void) { # if PY_VERSION_HEX >= 0x03000000 PyObject* m = PyModule_Create(&module_definition); # else - PyObject* m = Py_InitModule3(XBOB_EXT_MODULE_NAME, module_methods, module_docstr); + PyObject* m = Py_InitModule3(BOB_EXT_MODULE_NAME, module_methods, module_docstr); # endif if (!m) return 0; auto m_ = make_safe(m); ///< protects against early returns /* register version numbers and constants */ - if (PyModule_AddIntConstant(m, "api", XBOB_LEARN_ACTIVATION_API_VERSION) < 0) + if (PyModule_AddIntConstant(m, "api", BOB_LEARN_ACTIVATION_API_VERSION) < 0) return 0; - if (PyModule_AddStringConstant(m, "module", XBOB_EXT_MODULE_VERSION) < 0) + if (PyModule_AddStringConstant(m, "module", BOB_EXT_MODULE_VERSION) < 0) return 0; PyObject* externals = build_version_dictionary(); @@ -170,9 +170,9 @@ static PyObject* create_module (void) { if (PyModule_AddObject(m, "externals", externals) < 0) return 0; /* imports dependencies */ - if (import_xbob_blitz() < 0) { + if (import_bob_blitz() < 0) { PyErr_Print(); - PyErr_Format(PyExc_ImportError, "cannot import `%s'", XBOB_EXT_MODULE_NAME); + PyErr_Format(PyExc_ImportError, "cannot import `%s'", BOB_EXT_MODULE_NAME); return 0; } @@ -181,7 +181,7 @@ static PyObject* create_module (void) { } -PyMODINIT_FUNC XBOB_EXT_ENTRY_NAME (void) { +PyMODINIT_FUNC BOB_EXT_ENTRY_NAME (void) { # if PY_VERSION_HEX >= 0x03000000 return # endif diff --git a/buildout.cfg b/buildout.cfg index ed4c48af9b2f0fcb737c478b6514952ed8c28db9..1aa88c71fa7f12b3a9c855e64d1d58087ba51c29 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -4,25 +4,25 @@ [buildout] parts = scripts -eggs = xbob.learn.activation -extensions = xbob.buildout +eggs = bob.learn.activation +extensions = bob.buildout mr.developer auto-checkout = * -develop = src/xbob.extension - src/xbob.blitz - src/xbob.io.base +develop = src/bob.extension + src/bob.blitz + src/bob.io.base . -; options for xbob.buildout extension +; options for bob.buildout extension debug = true verbose = true prefixes = /idiap/group/torch5spro/releases/preview/install/linux-x86_64-release /Users/andre/work/bob/b/dbg/ [sources] -xbob.extension = git https://github.com/bioidiap/xbob.extension branch=prototype -xbob.blitz = git https://github.com/bioidiap/xbob.blitz -xbob.io.base = git https://github.com/bioidiap/xbob.io.base +bob.extension = git https://github.com/bioidiap/bob.extension +bob.blitz = git https://github.com/bioidiap/bob.blitz +bob.io.base = git https://github.com/bioidiap/bob.io.base [scripts] -recipe = xbob.buildout:scripts +recipe = bob.buildout:scripts diff --git a/doc/c_cpp_api.rst b/doc/c_cpp_api.rst index 2f4526afd78cba709d1560f251b9a73ad915b7db..05c4d07b72fdeb69c8507dcc42145ca4fb7e6e1b 100644 --- a/doc/c_cpp_api.rst +++ b/doc/c_cpp_api.rst @@ -6,11 +6,11 @@ C++ API ========= -The C++ API of ``xbob.learn.activation`` allows users to leverage from -automatic converters for classes in :py:class:`xbob.learn.activation`. To use +The C++ API of ``bob.learn.activation`` allows users to leverage from +automatic converters for classes in :py:class:`bob.learn.activation`. To use the C API, clients should first, include the header file -``<xbob.learn.activation/api.h>`` on their compilation units and then, make -sure to call once ``import_xbob_learn_activation()`` at their module +``<bob.learn.activation/api.h>`` on their compilation units and then, make +sure to call once ``import_bob_learn_activation()`` at their module instantiation, as explained at the `Python manual <http://docs.python.org/2/extending/extending.html#using-capsules>`_. @@ -19,7 +19,7 @@ the import function: .. code-block:: c++ - #include <xbob.learn.activation/api.h> + #include <bob.learn.activation/api.h> PyMODINIT_FUNC initclient(void) { @@ -28,33 +28,33 @@ the import function: if (!m) return; // imports dependencies - if (import_xbob_blitz() < 0) { + if (import_bob_blitz() < 0) { PyErr_Print(); PyErr_SetString(PyExc_ImportError, "cannot import module"); return 0; } - if (import_xbob_io_base() < 0) { + if (import_bob_io_base() < 0) { PyErr_Print(); PyErr_SetString(PyExc_ImportError, "cannot import module"); return 0; } - if (import_xbob_learn_activation() < 0) { + if (import_bob_learn_activation() < 0) { PyErr_Print(); PyErr_SetString(PyExc_ImportError, "cannot import module"); return 0; } - // imports xbob.learn.activation C-API - import_xbob_learn_activation(); + // imports bob.learn.activation C-API + import_bob_learn_activation(); } .. note:: The include directory can be discovered using - :py:func:`xbob.learn.activation.get_include`. + :py:func:`bob.learn.activation.get_include`. Activation Functors ------------------- diff --git a/doc/conf.py b/doc/conf.py index 9ff3a0fcfc3ea255d6d78df61d3cd6b55fd143b0..f8a2caa88f25dd396a128e15689ece1b258afb3c 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -58,12 +58,12 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'xbob.learn.activation' +project = u'bob.learn.activation' import time copyright = u'%s, Idiap Research Institute' % time.strftime('%Y') # Grab the setup entry -distribution = pkg_resources.require('xbob.learn.activation')[0] +distribution = pkg_resources.require('bob.learn.activation')[0] # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -129,7 +129,7 @@ if sphinx.__version__ >= "1.0": #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = 'xbob_learn_activation' +#html_short_title = 'bob_learn_activation' # The name of an image file (relative to this directory) to place at the top # of the sidebar. @@ -187,7 +187,7 @@ html_favicon = 'img/favicon.ico' #html_file_suffix = None # Output file base name for HTML help builder. -htmlhelp_basename = 'xbob_learn_activation_doc' +htmlhelp_basename = 'bob_learn_activation_doc' # -- Options for LaTeX output -------------------------------------------------- @@ -201,7 +201,7 @@ latex_font_size = '10pt' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'xbob_learn_activation.tex', u'Bob Activation Functions', + ('index', 'bob_learn_activation.tex', u'Bob Activation Functions', u'Biometrics Group, Idiap Research Institute', 'manual'), ] @@ -241,7 +241,7 @@ rst_epilog = """ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'xbob_learn_activation', u'Bob Activation Function Documentation', [u'Idiap Research Institute'], 1) + ('index', 'bob_learn_activation', u'Bob Activation Function Documentation', [u'Idiap Research Institute'], 1) ] # Default processing flags for sphinx diff --git a/doc/py_api.rst b/doc/py_api.rst index 40eff591511e3f7a2ab78ef1e4ecc252683e622c..8316825e69bc68d01cf59862aa7c52dee2b4b89d 100644 --- a/doc/py_api.rst +++ b/doc/py_api.rst @@ -7,8 +7,8 @@ ============ This section includes information for using the pure Python API of -``xbob.learn.activation``. +``bob.learn.activation``. -.. automodule:: xbob.learn.activation +.. automodule:: bob.learn.activation diff --git a/setup.py b/setup.py index 969b1e3507dbe295b55c318849cd901baeb426e3..3740ac10cd102ce6de8087c15d6fa3112d90fcef 100644 --- a/setup.py +++ b/setup.py @@ -4,24 +4,24 @@ # Mon 16 Apr 08:18:08 2012 CEST from setuptools import setup, find_packages, dist -dist.Distribution(dict(setup_requires=['xbob.blitz', 'xbob.io.base'])) -from xbob.blitz.extension import Extension -import xbob.io.base +dist.Distribution(dict(setup_requires=['bob.blitz', 'bob.io.base'])) +from bob.blitz.extension import Extension +import bob.io.base import os package_dir = os.path.dirname(os.path.realpath(__file__)) -package_dir = os.path.join(package_dir, 'xbob', 'learn', 'activation', 'include') -include_dirs = [package_dir, xbob.io.base.get_include()] +package_dir = os.path.join(package_dir, 'bob', 'learn', 'activation', 'include') +include_dirs = [package_dir, bob.io.base.get_include()] packages = ['bob-machine >= 1.2.2'] version = '2.0.0a0' setup( - name='xbob.learn.activation', + name='bob.learn.activation', version=version, description='Bindings for bob.machine\'s Activation functors', - url='http://github.com/bioidiap/xbob.learn.activation', + url='http://github.com/bioidiap/bob.learn.activation', license='BSD', author='Andre Anjos', author_email='andre.anjos@idiap.ch', @@ -33,33 +33,33 @@ setup( install_requires=[ 'setuptools', - 'xbob.blitz', - 'xbob.io.base', + 'bob.blitz', + 'bob.io.base', ], namespace_packages=[ - "xbob", - "xbob.learn", + "bob", + "bob.learn", ], ext_modules = [ - Extension("xbob.learn.activation.version", + Extension("bob.learn.activation.version", [ - "xbob/learn/activation/version.cpp", + "bob/learn/activation/version.cpp", ], packages = packages, include_dirs = include_dirs, version = version, ), - Extension("xbob.learn.activation._library", + Extension("bob.learn.activation._library", [ - "xbob/learn/activation/activation.cpp", - "xbob/learn/activation/identity.cpp", - "xbob/learn/activation/linear.cpp", - "xbob/learn/activation/logistic.cpp", - "xbob/learn/activation/tanh.cpp", - "xbob/learn/activation/mult_tanh.cpp", - "xbob/learn/activation/main.cpp", + "bob/learn/activation/activation.cpp", + "bob/learn/activation/identity.cpp", + "bob/learn/activation/linear.cpp", + "bob/learn/activation/logistic.cpp", + "bob/learn/activation/tanh.cpp", + "bob/learn/activation/mult_tanh.cpp", + "bob/learn/activation/main.cpp", ], packages = packages, include_dirs = include_dirs, diff --git a/xbob/learn/activation/include/xbob.learn.activation/config.h b/xbob/learn/activation/include/xbob.learn.activation/config.h deleted file mode 100644 index 3b643aad276110d43538d7dd67266566404e1683..0000000000000000000000000000000000000000 --- a/xbob/learn/activation/include/xbob.learn.activation/config.h +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @author Andre Anjos <andre.anjos@idiap.ch> - * @date Fri 13 Dec 2013 11:50:29 CET - * - * @brief General directives for all modules in xbob.learn.activation - */ - -#ifndef XBOB_LEARN_ACTIVATION_CONFIG_H -#define XBOB_LEARN_ACTIVATION_CONFIG_H - -/* Macros that define versions and important names */ -#define XBOB_LEARN_ACTIVATION_API_VERSION 0x0200 - -#endif /* XBOB_LEARN_ACTIVATION_CONFIG_H */