Commit 39f5a77
committed
Bug fix for python bindings for non-contiguous input vectors
When a non-contiguous numpy vector (e.g. a sliced view into a numpy array) is
used as an input argument to a bound function, the underlying C++ object does
not properly account for strides in the input array. Use the pybind11 numpy
interface to handle this properly, while still allowing type conversion.1 parent 31c17e8 commit 39f5a77
File tree
3 files changed
+15
-9
lines changed- core
- src
- tests
3 files changed
+15
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | 83 | | |
92 | 84 | | |
93 | 85 | | |
| |||
124 | 116 | | |
125 | 117 | | |
126 | 118 | | |
127 | | - | |
| 119 | + | |
128 | 120 | | |
129 | 121 | | |
130 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments