My_Solution#222
Open
OudoumAlihoumed wants to merge 5 commits into
Open
Conversation
Added input validation for numpy array and dimensions.
There was a problem hiding this comment.
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_indexusingargmax+unravel_index. - Implemented
wallis_productusing 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.
| j = 0 | ||
|
|
||
| # TODO | ||
| if not isinstance(X, np.ndarray): |
|
|
||
| # 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/)." | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added input validation for numpy array and dimensions.