Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 959b71d

Browse files
author
Rue Yokaze
committed
use num_elements provided by boost
1 parent 115b0f6 commit 959b71d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

‎python_multi_array.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -356,12 +356,7 @@ namespace python_multi_array
356356
{
357357
throw std::invalid_argument("self");
358358
}
359-
size_t n = 1;
360-
for (size_t i = 0; i < N; ++i)
361-
{
362-
n *= This->shape()[i];
363-
}
364-
return n;
359+
return This->num_elements();
365360
}
366361

367362
//

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /