mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
pybind11 compatibility
This commit is contained in:
parent
25342f7c3f
commit
832485e41a
@ -16,8 +16,8 @@ namespace py = pybind11;
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// automatic conversion of python list to Array<>
|
// automatic conversion of python list to Array<>
|
||||||
PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
|
namespace pybind11 {
|
||||||
PYBIND11_NAMESPACE_BEGIN(detail)
|
namespace detail {
|
||||||
|
|
||||||
template <typename Type, typename Value> struct ngcore_list_caster {
|
template <typename Type, typename Value> struct ngcore_list_caster {
|
||||||
using value_conv = make_caster<Value>;
|
using value_conv = make_caster<Value>;
|
||||||
@ -60,8 +60,8 @@ template <typename Type> struct type_caster<ngcore::Array<Type>>
|
|||||||
: ngcore_list_caster<ngcore::Array<Type>, Type> { };
|
: ngcore_list_caster<ngcore::Array<Type>, Type> { };
|
||||||
|
|
||||||
|
|
||||||
PYBIND11_NAMESPACE_END(detail)
|
} // namespace detail
|
||||||
PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)
|
} // namespace pybind11
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace ngcore
|
namespace ngcore
|
||||||
|
Loading…
Reference in New Issue
Block a user