mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
c++-Array -> Py-tuple
This commit is contained in:
parent
a311b5db39
commit
b4dffe266e
@ -286,6 +286,15 @@ namespace ngcore
|
||||
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>
|
||||
void ExportArray (py::module &m)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user