Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F66354356
Allocate.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jun 10, 00:44
Size
1002 B
Mime Type
text/x-c
Expires
Wed, Jun 12, 00:44 (2 d)
Engine
blob
Format
Raw Data
Handle
18209505
Attached To
rGOOSEFEM GooseFEM
Allocate.hpp
View Options
/**
* @file
* @copyright Copyright 2017. Tom de Geus. All rights reserved.
* @license This project is released under the GNU Public License (GPLv3).
*/
#include <GooseFEM/Allocate.h>
#include <pybind11/pybind11.h>
#include <xtensor-python/pyarray.hpp>
namespace py = pybind11;
void init_Allocate(py::module& m)
{
m.def(
"AsTensor",
static_cast<xt::xarray<double> (*)(const xt::pyarray<double>&, const std::vector<size_t>&)>(
&GooseFEM::AsTensor),
"See :cpp:func:`GooseFEM::AsTensor`.",
py::arg("arg"),
py::arg("shape"));
m.def(
"AsTensor",
static_cast<xt::xarray<double> (*)(size_t, const xt::pyarray<double>&, size_t)>(
&GooseFEM::AsTensor),
"See :cpp:func:`GooseFEM::AsTensor`.",
py::arg("rank"),
py::arg("arg"),
py::arg("n"));
m.def(
"as3d",
&GooseFEM::as3d<xt::pyarray<double>>,
"See :cpp:func:`GooseFEM::as3d`.",
py::arg("arg"));
}
Event Timeline
Log In to Comment