Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arbor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
arbor-sim
arbor
Commits
7c7b2284
Unverified
Commit
7c7b2284
authored
3 years ago
by
Benjamin Cumming
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
improve error diagnostics in python recipe (#1743)
parent
d4e65e42
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
python/recipe.cpp
+4
-0
4 additions, 0 deletions
python/recipe.cpp
python/recipe.hpp
+0
-1
0 additions, 1 deletion
python/recipe.hpp
with
4 additions
and
1 deletion
python/recipe.cpp
+
4
−
0
View file @
7c7b2284
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
#include
<arbor/morph/primitives.hpp>
#include
<arbor/morph/primitives.hpp>
#include
<arbor/recipe.hpp>
#include
<arbor/recipe.hpp>
#include
"arbor/cable_cell_param.hpp"
#include
"conversion.hpp"
#include
"conversion.hpp"
#include
"error.hpp"
#include
"error.hpp"
#include
"event_generator.hpp"
#include
"event_generator.hpp"
...
@@ -70,6 +71,9 @@ static std::any convert_gprop(pybind11::object o) {
...
@@ -70,6 +71,9 @@ static std::any convert_gprop(pybind11::object o) {
if
(
o
.
is
(
pybind11
::
none
()))
{
if
(
o
.
is
(
pybind11
::
none
()))
{
return
{};
return
{};
}
}
if
(
!
pybind11
::
isinstance
<
arb
::
cable_cell_global_properties
>
(
o
))
{
throw
pyarb_error
(
"recipe.global_properties must return a valid description of cable cell properties of type arbor.cable_global_properties"
);
}
return
pybind11
::
cast
<
arb
::
cable_cell_global_properties
>
(
o
);
return
pybind11
::
cast
<
arb
::
cable_cell_global_properties
>
(
o
);
}
}
...
...
This diff is collapsed.
Click to expand it.
python/recipe.hpp
+
0
−
1
View file @
7c7b2284
...
@@ -48,7 +48,6 @@ public:
...
@@ -48,7 +48,6 @@ public:
virtual
pybind11
::
object
global_properties
(
arb
::
cell_kind
kind
)
const
{
virtual
pybind11
::
object
global_properties
(
arb
::
cell_kind
kind
)
const
{
return
pybind11
::
none
();
return
pybind11
::
none
();
};
};
//TODO: virtual pybind11::object global_properties(arb::cell_kind kind) const {return pybind11::none();};
};
};
class
py_recipe_trampoline
:
public
py_recipe
{
class
py_recipe_trampoline
:
public
py_recipe
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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