Skip to content

Commit

Permalink
Return 0D arrays for 0D shape in operators
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffburdick committed Jan 12, 2024
1 parent 43ea5b8 commit 34292e9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/matx/operators/base_operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ namespace matx

__MATX_INLINE__ __MATX_HOST__ __MATX_DEVICE__ auto Shape() const {
if constexpr (T::Rank() == 0) {
std::array<index_t, 1> sizes_{1};
return sizes_;
return std::array<index_t, 0> {};
}
else {
std::array<index_t, T::Rank()> sizes_;
Expand Down

0 comments on commit 34292e9

Please sign in to comment.