-
Notifications
You must be signed in to change notification settings - Fork 768
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1628 from borglab/python-updates
- Loading branch information
Showing
167 changed files
with
8,135 additions
and
1,939 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-r requirements.txt | ||
pyparsing>=2.4.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
numpy>=1.11.0 | ||
pyparsing>=2.4.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ __pycache__/ | |
*dist* | ||
*.egg-info | ||
|
||
**/.DS_Store | ||
|
||
# Files related to code coverage stats | ||
**/.coverage | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
template <op_id id, op_type ot, typename L = undefined_t, typename R = undefined_t> | ||
template <typename ThisT> | ||
auto &this_ = static_cast<ThisT &>(*this); | ||
if (load_impl<ThisT>(temp, false)) { | ||
ssize_t nd = 0; | ||
auto trivial = broadcast(buffers, nd, shape); | ||
auto ndim = (size_t) nd; | ||
int nd; | ||
ssize_t ndim() const { return detail::array_proxy(m_ptr)->nd; } | ||
using op = op_impl<id, ot, Base, L_type, R_type>; | ||
template <op_id id, op_type ot, typename L, typename R> | ||
template <detail::op_id id, detail::op_type ot, typename L, typename R, typename... Extra> | ||
class_ &def(const detail::op_<id, ot, L, R> &op, const Extra &...extra) { | ||
class_ &def_cast(const detail::op_<id, ot, L, R> &op, const Extra &...extra) { | ||
@pytest.mark.parametrize("access", ["ro", "rw", "static_ro", "static_rw"]) | ||
struct IntStruct { | ||
explicit IntStruct(int v) : value(v){}; | ||
~IntStruct() { value = -value; } | ||
IntStruct(const IntStruct &) = default; | ||
IntStruct &operator=(const IntStruct &) = default; | ||
py::class_<IntStruct>(m, "IntStruct").def(py::init([](const int i) { return IntStruct(i); })); | ||
py::implicitly_convertible<int, IntStruct>(); | ||
m.def("test", [](int expected, const IntStruct &in) { | ||
[](int expected, const IntStruct &in) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.