Advanced Indexing: Revision history

From Master of Neuroscience Wiki

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

17 October 2025

  • curprev 16:4116:41, 17 October 2025 Davrot talk contribs 6,781 bytes −15 No edit summary Tag: Visual edit
  • curprev 12:4612:46, 17 October 2025 Davrot talk contribs 6,796 bytes +6,796 Created page with "== The goal == Beside slicing there is something called advanced indexing Questions to [mailto:davrot@uni-bremen.de David Rotermund] == [https://numpy.org/doc/stable/user/basics.indexing.html#boolean-array-indexing Boolean Array​] == We can use Boolean arrays for more complicate indexing:<syntaxhighlight lang="python">import numpy as np a = np.arange(1,10).reshape(3,3) b = np.zeros_like(a) b[a.sum(axis=1) > 6, :] = 1 print(a) print() print(b)</syntaxhighlight>Outp..." Tag: Visual edit