Skip to content

Assignment 2#2

Open
vikramkatju wants to merge 10 commits intomainfrom
assignment-2
Open

Assignment 2#2
vikramkatju wants to merge 10 commits intomainfrom
assignment-2

Conversation

@vikramkatju
Copy link
Copy Markdown
Owner

@vikramkatju vikramkatju commented Dec 6, 2024

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)

Answered the Assignment 2 questions by adding Python code

What did you learn from the changes you have made?

numpy is nice.

Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?

I was initially thinking of doing the questions without using numpy since Question 2 said 'consider using numpy' but I am glad I used numpy. It made the required coding a lot easier.

Were there any challenges? If so, what issue(s) did you face? How did you overcome it?

No particular challenges other than picking up how numpy works.

How were these changes tested?

tested locally on my computer

A reference to a related issue in your repository (if applicable)

not applicable

Checklist

  • I can confirm that my changes are working as intended

Copy link
Copy Markdown

@anjali-deshpande-hub anjali-deshpande-hub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done!

Just a few things:

  1. Changes to assignment_1.ipynb should not be part of this PR. This PR should have only have assignment_2.ipynb changes

  2. I noticed that in many function calls, there is space between the function name and call eg:
    data.max (axis = 1)
    zero_in_means = check_zeros (mean_values)

It's generally not recommended to have a space between the function name and the parentheses in a function call. The space can lead to confusion for other developers who are reading your code.

@anjali-deshpande-hub
Copy link
Copy Markdown

The standard for Python code is outlined in PEP 8, which is the official style guide for Python code.

@vikramkatju
Copy link
Copy Markdown
Owner Author

Hi Anjali, removing the spaces is not a problem (and thanks for the link to the style guide). But I am concerned if I start trying to remove Assignment_1.ipynb from the assignment-2 branch at this point I will end up losing the extra code I added in Assignment_2.ipynb on this branch. I will point out that this issue was something that had bothered me and I had discussed it with Pedram who told me that it is all right to have both Assignment_1.ipynb and Assignment_2.ipynb with my added code on the assignment-2 branch and also on the assignment-1 branch. I would suggest letting it go for this assignment. I will be more careful about this issue in future assignments. Let me know what you think.

@anjali-deshpande-hub
Copy link
Copy Markdown

This issue is common and easy to fix. First, make sure to commit and push your changes to assignment_2.ipynb on GitHub. After that, avoid making any further changes to this file, both locally and on GitHub.

Then, follow the steps outlined in this thread: Fixing Issue Link.

This is a great learning opportunity, and similar scenarios often arise in the workplace. Don’t worry, you’ve got this! :)

@vikramkatju
Copy link
Copy Markdown
Owner Author

vikramkatju commented Dec 11, 2024

Hi Anjali, I think it's ok now. Thank you for forcing me to learn how to resolve this issue.

@anjali-deshpande-hub
Copy link
Copy Markdown

Very Good!
One last thing: Please remove spaces in calls to print function as well.

@vikramkatju
Copy link
Copy Markdown
Owner Author

Hi Anjali I've done it.

Copy link
Copy Markdown

@anjali-deshpande-hub anjali-deshpande-hub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants