| 570 | |
| 571 | template <typename T> |
| 572 | bool is_vector( |
| 573 | const py::array_t<T>& m |
| 574 | ) |
| 575 | { |
| 576 | const size_t dims = m.ndim(); |
| 577 | const size_t size = m.size(); |
| 578 | if (dims == 1) |
| 579 | return true; |
| 580 | |
| 581 | for (size_t i = 0; i < dims; ++i) |
| 582 | { |
| 583 | if (m.shape(i) != 1 && m.shape(i) != size) |
| 584 | return false; |
| 585 | } |
| 586 | |
| 587 | return true; |
| 588 | } |
| 589 | |
| 590 | template <typename T> |
| 591 | py::tuple py_spatially_filter_image_separable ( |
no test coverage detected