| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -369,9 +369,11 @@ class array_view : public detail::array_view_accessors<array_view, T, ND> | |||
| 369 | 369 | ||
| 370 | 370 | array_view(const array_view &other, bool contiguous = false) : m_arr(NULL), m_data(NULL) | |
| 371 | 371 | { | |
| 372 | - if (!set((PyObject *)other.m_arr)) { | ||
| 373 | - throw py::exception(); | ||
| 374 | - } | ||
| 372 | + m_arr = other.m_arr; | ||
| 373 | + Py_INCREF(m_arr); | ||
| 374 | + m_data = other.m_data; | ||
| 375 | + m_shape = other.m_shape; | ||
| 376 | + m_strides = other.m_strides; | ||
| 375 | 377 | } | |
| 376 | 378 | ||
| 377 | 379 | array_view(PyArrayObject *arr, char *data, npy_intp *shape, npy_intp *strides) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments