We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c19dae6 commit 7033020Copy full SHA for 7033020
include/xtensor-python/pycontainer.hpp
@@ -93,6 +93,7 @@ namespace xt
93
void reshape(S&& shape, layout_type layout = base_type::static_layout);
94
95
layout_type layout() const;
96
+ bool is_contiguous() const noexcept;
97
98
using base_type::operator();
99
using base_type::operator[];
@@ -442,6 +443,16 @@ namespace xt
442
443
}
444
445
446
+ /**
447
+ * Return whether or not the container uses contiguous buffer
448
+ * @return Boolean for contiguous buffer
449
+ */
450
+ template <class D>
451
+ inline bool pycontainer<D>::is_contiguous() const noexcept
452
+ {
453
+ return layout_type::dynamic != layout();
454
+ }
455
+
456
/**
457
* Import the numpy Python module.
458
*/
0 commit comments