There is an error in a week 2 programming assignment documentation.
There should be axis=0 for row and axis=1 for column.

1 Like

Hey @nomi , which course is this ?

@Mubsi, it is course 1(neural networks and deep learning) of deep learning specialization.

Thanks, @nomi. To have your queries answered, and promptly, kindly try and put them in the right category. For now, I have replaced it. In the future, please be mindful of where you post so that we can help better.

Hey @kenb , @petrifast, can you please take a look at this ? Thanks.

1 Like

@Mubsi Sorry for that, next time I will. Actually I was unaware of how this category thing works.

1 Like

Hey @nomi we have made a Guide to Discourse for precisely this reason. Give it a read sometime: Discourse guide for learners - Google Docs

1 Like

Thanks @Mubsi , actually while learning all that stuff, it fascinates me so much that I didnâ€™t bother myself to read that discourse guideline but I will read these guideline now.

1 Like

HI @nomi. This appears to be mostly semantic confusion. I have a hard time keeping it straight myself. The `axis=0` option means that one aggregates (sums, means, etc) â€śdownâ€ť the rows of a matrix; `axis=1` means that one sums â€śacrossâ€ť the columns of the matrix. Apparently, â€śrow-wiseâ€ť means that you are aggregating the elements of the individuals rows.

5 Likes

Hi @kenb and @nomi,

Indeed, the `axis` value is not intuitive and the language in the problem set, while correct, is a bit nuanced.

When in doubt, I usually create an empty cell and try out the operation on an example numpy matrix. After applying the aggregate across an `axis` I check the shape of the result to see if the aggregation took place over the direction I want.

2 Likes

My 2 cents, when I think about `axis = 1`, I see the `1` as something â€śverticalâ€ť which helps me remind that value is for columns

4 Likes

Hi @nomi,