What is the role of keepdims in Numpy (Python)?

后端 未结 4 1175
北海茫月
北海茫月 2021-02-10 10:26

When I use np.sum, I encountered a parameter called keepdims. After looking up the docs, I still cannot understand the meaning of keepdims

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-10 11:24

    keepdims = True, is used for matching dimensions of matrix. If we left this False then it will show error of dimension error. You can see it while calculating softmax entropy

提交回复
热议问题