mirror of
https://github.com/NGSolve/netgen.git
synced 2025-04-12 16:17:29 +05:00
c++-Array -> Py-tuple
This commit is contained in:
parent
a311b5db39
commit
b4dffe266e
@ -286,6 +286,15 @@ namespace ngcore
|
|||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
py::object makePyTuple (FlatArray<T> ar)
|
||||||
|
{
|
||||||
|
py::tuple res(ar.Size());
|
||||||
|
for (auto i : Range(ar))
|
||||||
|
res[i] = py::cast(ar[i]);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, typename TIND=typename FlatArray<T>::index_type>
|
template <typename T, typename TIND=typename FlatArray<T>::index_type>
|
||||||
void ExportArray (py::module &m)
|
void ExportArray (py::module &m)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user