Skip to content

Commit 31f4086

Browse files
author
gerrymanoim
authored
Merge pull request #154 from quantopian/ndarray-shape
BUG: `shape()` should return shape
2 parents 429f80f + 906f6b6 commit 31f4086

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

include/libpy/ndarray_view.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ class ndarray_view {
220220
return ndim;
221221
}
222222

223-
/** The number of bytes to go from one element to the next.
223+
/** The shape of this array.
224224
*/
225225
const std::array<std::size_t, ndim>& shape() const {
226226
return m_shape;
@@ -815,10 +815,10 @@ class any_ref_ndarray_view {
815815
return ndim;
816816
}
817817

818-
/** The number of bytes to go from one element to the next.
818+
/** The shape of this array.
819819
*/
820820
const std::array<std::size_t, ndim>& shape() const {
821-
return m_strides;
821+
return m_shape;
822822
}
823823

824824
/** The number of bytes to go from one element to the next.

0 commit comments

Comments
 (0)