File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Original file line number Diff line number Diff line change @@ -367,17 +367,19 @@ class array_view : public detail::array_view_accessors<array_view, T, ND>
367
367
}
368
368
}
369
369
370
- array_view (const array_view &other, bool contiguous = false ) : m_arr(NULL ), m_data(NULL )
370
+ array_view (const array_view &other) : 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_XINCREF (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)
378
380
{
379
381
m_arr = arr;
380
- Py_INCREF (arr);
382
+ Py_XINCREF (arr);
381
383
m_data = data;
382
384
m_shape = shape;
383
385
m_strides = strides;
You can’t perform that action at this time.
0 commit comments