Skip to content

My_Solution#222

Open
OudoumAlihoumed wants to merge 5 commits into
x-datascience-datacamp:mainfrom
OudoumAlihoumed:main
Open

My_Solution#222
OudoumAlihoumed wants to merge 5 commits into
x-datascience-datacamp:mainfrom
OudoumAlihoumed:main

Conversation

@OudoumAlihoumed
Copy link
Copy Markdown

Added input validation for numpy array and dimensions.

Copilot AI review requested due to automatic review settings May 5, 2026 18:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to complete the NumPy assignment functions by adding input validation and implementing the required computations, but it also introduces a large, unrelated Jupyter notebook file.

Changes:

  • Added NumPy array type / dimensionality validation and implemented max_index using argmax + unravel_index.
  • Implemented wallis_product using a vectorized Wallis product computation.
  • Added a new, large CNN/ResNet exercises notebook under chapter0_fundamentals/... (appears unrelated to the PR description and the assignment scope).

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 3 comments.

File Description
numpy_questions.py Implements max_index validation + logic and implements wallis_product.
chapter0_fundamentals/exercises/part2_cnns/0.2_CNNs_&_ResNets_exercises.ipynb Adds a large notebook not mentioned in the PR description and seemingly unrelated to the NumPy assignment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread numpy_questions.py
j = 0

# TODO
if not isinstance(X, np.ndarray):
Comment thread numpy_questions.py

# Find the flattened index of the maximum
idx_flat = np.argmax(X)

Comment on lines +1 to +20
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "4Lfd9jLeS68h"
},
"source": [
"# [0.2] - CNNs & ResNets (exercises)\n",
"\n",
"> **ARENA [Streamlit Page](https://arena-chapter0-fundamentals.streamlit.app/02_[0.2]_CNNs_&_ResNets)**\n",
">\n",
"> **Colab: [exercises](https://colab.research.google.com/github/callummcdougall/ARENA_3.0/blob/main/chapter0_fundamentals/exercises/part2_cnns/0.2_CNNs_&_ResNets_exercises.ipynb?t=20260303) | [solutions](https://colab.research.google.com/github/callummcdougall/ARENA_3.0/blob/main/chapter0_fundamentals/exercises/part2_cnns/0.2_CNNs_&_ResNets_solutions.ipynb?t=20260303)**\n",
"\n",
"Please send any problems / bugs on the `#errata` channel in the [Slack group](https://join.slack.com/t/arena-uk/shared_invite/zt-3afdmdhye-Mdb3Sv~ss_V_mEaXEbkABA), and ask any questions on the dedicated channels for this chapter of material.\n",
"\n",
"You can collapse each section so only the headers are visible, by clicking the arrow symbol on the left hand side of the markdown header cells.\n",
"\n",
"Links to all other chapters: [(0) Fundamentals](https://arena-chapter0-fundamentals.streamlit.app/), [(1) Transformer Interpretability](https://arena-chapter1-transformer-interp.streamlit.app/), [(2) RL](https://arena-chapter2-rl.streamlit.app/)."
]
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