@@ -29,25 +29,23 @@ void init_BoxArray(py::module &m) {
2929 }
3030 )
3131
32- // ! Construct an empty BoxArray
32+ // Construct an empty BoxArray
3333 .def (py::init<>())
34- // .def(py::init< BoxArray const& >())
35- // .def(py::init< BoxArray const& & >())
34+ // Copy a BoxArray
35+ .def (py::init< BoxArray const & >())
3636
37- // ! Construct a BoxArray from an array of Boxes of size nbox .
37+ // Construct a BoxArray from a single Box .
3838 .def (py::init< Box const & >())
39- // ! Construct a BoxArray from an array of Boxes of size nbox.
40- .def (py::init< const Box*, int >())
39+ // Construct a BoxArray from a list of Boxes.
40+ .def (py::init ([](Vector<Box> bl) {
41+ return BoxArray (bl.dataPtr (), bl.size ());
42+ }))
4143
42- /*
43- //! Construct a BoxArray from a BoxList.
44- explicit BoxArray (const BoxList& bl);
45- explicit BoxArray (BoxList&& bl) noexcept;
44+ // Construct a BoxArray from a BoxList.
45+ .def (py::init< BoxList const & >())
4646
47- BoxArray (const BoxArray& rhs, const BATransformer& trans);
48-
49- BoxArray (BoxList&& bl, IntVect const& max_grid_size);
50- */
47+ // BoxArray (const BoxArray& rhs, const BATransformer& trans);
48+ // BoxArray (BoxList&& bl, IntVect const& max_grid_size);
5149
5250 .def_property_readonly (" size" , &BoxArray::size)
5351 .def_property_readonly (" capacity" , &BoxArray::capacity)
0 commit comments