Skip to content

Commit

Permalink
updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wjakob committed Nov 9, 2017
1 parent e939192 commit 3e5257e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ext/pybind11
Submodule pybind11 updated 180 files
2 changes: 1 addition & 1 deletion ext/tinyformat
3 changes: 3 additions & 0 deletions include/layer/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ template <typename Scalar, int _Dimension> struct TVector : public Eigen::Matrix
/// Create a new 4D vector (type error if \c Dimension != 4)
TVector(Scalar x, Scalar y, Scalar z, Scalar w) : Base(x, y, z, w) { }

/// Dummy constructor
TVector(ssize_t rows, ssize_t cols) { assert(rows * cols == Dimension); (void) rows; (void) cols; }

/// Construct a vector from a dense Eigen expression template
template <typename Derived> TVector(const Eigen::DenseBase<Derived>& p)
: Base(p) { }
Expand Down
2 changes: 1 addition & 1 deletion src/py_filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void python_export_filesystem(py::module &m) {
return oss.str();
});

py::class_<MemoryMappedFile>(fs_module, "MemoryMappedFile")
py::class_<MemoryMappedFile>(fs_module, "MemoryMappedFile", py::buffer_protocol())
.def(py::init<fs::path, size_t>())
.def(py::init<fs::path, bool>())
.def(py::init<fs::path>())
Expand Down
2 changes: 1 addition & 1 deletion src/py_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void python_export_layer(py::module &m) {
.def_property_readonly("transmissionBottomTop", [](const LayerMode &m) -> MatrixX { return m.transmissionBottomTop; }, D(LayerMode, transmissionBottomTop));

py::class_<Layer>(m, "Layer", D(Layer))
.def(py::init<const VectorX &, const VectorX &, int>(), py::arg("nodes"), py::arg("weights"), py::arg("nFourierOrders") = 1)
.def(py::init<const VectorX &, const VectorX &, size_t>(), py::arg("nodes"), py::arg("weights"), py::arg("nFourierOrders") = 1)
.def(py::init<const Layer&>())
.def("reverse", &Layer::reverse, D(Layer, reverse))
.def("clear", &Layer::clear, D(Layer, clear))
Expand Down
6 changes: 2 additions & 4 deletions src/python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ PYTHON_DECLARE(layer);
PYTHON_DECLARE(fresnel);
PYTHON_DECLARE(quad);

PYBIND11_PLUGIN(layerlab) {
py::module m("layerlab", "Layer lab Python plugin");
PYBIND11_MODULE(layerlab, m) {
m.doc() = "Layer lab Python plugin";

PYTHON_IMPORT(math);
PYTHON_IMPORT(spline);
Expand All @@ -28,6 +28,4 @@ PYBIND11_PLUGIN(layerlab) {
PYTHON_IMPORT(layer);
PYTHON_IMPORT(fresnel);
PYTHON_IMPORT(quad);

return m.ptr();
}

0 comments on commit 3e5257e

Please sign in to comment.