From e6fde42f991eca0c75e912554440d119cc28c137 Mon Sep 17 00:00:00 2001 From: Amrit Mundlapudi Date: Sun, 26 Apr 2026 11:37:52 -0400 Subject: [PATCH 1/2] Add runtime restart warning to prevent NumPy import error Addresses issue #27 by adding a clear warning in the notebook instructing Colab users to restart runtime after installation. This prevents the 'ImportError: cannot import name _center' error caused by NumPy version mismatch. --- tribe_demo.ipynb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tribe_demo.ipynb b/tribe_demo.ipynb index 232905b6..7238cc5a 100644 --- a/tribe_demo.ipynb +++ b/tribe_demo.ipynb @@ -40,6 +40,20 @@ "!uv pip install \"tribev2[plotting] @ git+https://github.com/facebookresearch/tribev2.git\"" ] }, + { + "cell_type": "markdown", + "id": "e27cab4b", + "metadata": {}, + "source": [ + "> **⚠️ Important: Restart Runtime Required**\n", + ">\n", + "> After running the installation cell above, you must **restart the Colab runtime** before continuing:\n", + ">\n", + "> `Runtime → Restart runtime`\n", + ">\n", + "> This ensures NumPy 2.2.6 loads correctly. Skipping this step causes `ImportError: cannot import name '_center'`." + ] + }, { "cell_type": "markdown", "id": "45e1d595", From 73f719505f62ef605883e46123f3b24c45c328c0 Mon Sep 17 00:00:00 2001 From: Amrit Mundlapudi Date: Sun, 26 Apr 2026 16:33:06 -0400 Subject: [PATCH 2/2] Address Copilot feedback: full error msg, consistent formatting, generic NumPy version --- tribe_demo.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tribe_demo.ipynb b/tribe_demo.ipynb index 7238cc5a..906b1ae1 100644 --- a/tribe_demo.ipynb +++ b/tribe_demo.ipynb @@ -49,9 +49,9 @@ ">\n", "> After running the installation cell above, you must **restart the Colab runtime** before continuing:\n", ">\n", - "> `Runtime → Restart runtime`\n", + "> `Menu > Runtime > Restart runtime`\n", ">\n", - "> This ensures NumPy 2.2.6 loads correctly. Skipping this step causes `ImportError: cannot import name '_center'`." + "> This ensures the updated NumPy version loads correctly. Skipping this step causes `ImportError: cannot import name '_center' from 'numpy._core.umath'`." ] }, {