Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.learn.activation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.learn.activation
Commits
543fbadf
Commit
543fbadf
authored
10 years ago
by
Manuel Günther
Browse files
Options
Downloads
Patches
Plain Diff
Replaced mal-functioning PyNumber_Check with the novel PyBob_NumberCheck.
parent
1108385e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/learn/activation/activation.cpp
+7
-8
7 additions, 8 deletions
bob/learn/activation/activation.cpp
requirements.txt
+1
-1
1 addition, 1 deletion
requirements.txt
with
8 additions
and
9 deletions
bob/learn/activation/activation.cpp
+
7
−
8
View file @
543fbadf
...
...
@@ -8,10 +8,11 @@
*/
#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.extension/defines.h>
#include
<bob.learn.activation/api.h>
#include
<bob.io.base/api.h>
#include
<bob.learn.activation/Activation.h>
#include
<boost/bind.hpp>
#include
<boost/function.hpp>
...
...
@@ -63,7 +64,7 @@ PyObject* PyBobLearnActivation_NewFromActivation
retval
->
cxx
=
a
;
return
reinterpret_cast
<
PyObject
*>
(
retval
);
return
Py_BuildValue
(
"N"
,
retval
);
}
...
...
@@ -174,12 +175,11 @@ static PyObject* PyBobLearnActivation_call1(PyBobLearnActivationObject* self,
return
0
;
}
Py_INCREF
(
res
);
return
PyBlitzArray_NUMPY_WRAP
(
res
);
return
PyBlitzArray_NUMPY_WRAP
(
Py_BuildValue
(
"O"
,
res
));
}
else
if
(
PyNumber
_
Check
(
z
))
{
else
if
(
Py
Bob_
NumberCheck
(
z
))
{
PyObject
*
z_float
=
PyNumber_Float
(
z
);
auto
z_float_
=
make_safe
(
z_float
);
...
...
@@ -251,8 +251,7 @@ static PyObject* PyBobLearnActivation_call2(PyBobLearnActivationObject* self,
return
0
;
}
Py_INCREF
(
res
);
return
PyBlitzArray_NUMPY_WRAP
(
reinterpret_cast
<
PyObject
*>
(
res
));
return
PyBlitzArray_NUMPY_WRAP
(
Py_BuildValue
(
"O"
,
res
));
}
...
...
This diff is collapsed.
Click to expand it.
requirements.txt
+
1
−
1
View file @
543fbadf
setuptools
bob.extension
bob.extension
>2.0.4
bob.blitz
bob.core
bob.io.base
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment