From 27282d2b182aa59ab273ce631e5885c4aa83bbeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 14 May 2024 14:47:20 +0200 Subject: [PATCH] NumPy --- README.md | 1 + index.html | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index dcbc6d8..4b2b062 100644 --- a/README.md +++ b/README.md @@ -2708,6 +2708,7 @@ import numpy as np ``` * **`':'` returns a slice of all dimension's indices. Omitted dimensions default to `':'`.** * **Indices should not be tuples because Python converts `'obj[i, j]'` to `'obj[(i, j)]'`!** +* **`'ix_()'` returns two 2d arrays. Indices of different shapes get unified with broadcasting.** * **Any value that is broadcastable to the indexed shape can be assigned to the selection.** ### Broadcasting diff --git a/index.html b/index.html index 200fe46..1097f5d 100644 --- a/index.html +++ b/index.html @@ -2215,6 +2215,7 @@ $ snakeviz test.prof ':' returns a slice of all dimension's indices. Omitted dimensions default to ':'.
  • Indices should not be tuples because Python converts 'obj[i, j]' to 'obj[(i, j)]'!
  • +
  • 'ix_()' returns two 2d arrays. Indices of different shapes get unified with broadcasting.
  • Any value that is broadcastable to the indexed shape can be assigned to the selection.
  • Broadcasting

    Set of rules by which NumPy functions operate on arrays of different sizes and/or dimensions.

    left  = [[0.1], [0.6], [0.8]]                           # Shape: (3, 1)