Week #7: Support keepdims in Pythran's numpy mean

Published: 07/26/2021

What did you do this week?

What is coming up next?

Did you get stuck anywhere?

While supporting keepdims in numpy mean, I added a function mean(E const &expr, types::none_type axis, dtype d, std::true_type keepdims) , but I'm not sure how can I declare the return for this function . I think we need to calculated the out_shape so we can -> decltype(numpy::functor::asarray{}(sum(expr) / typename dtype::type(expr.flat_size())).reshape(out_shape))