Skip to content

Commit dd5f009

Browse files
committed
Fix null related docs.
1 parent 2864f53 commit dd5f009

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

docs/how-to-use/getting_started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ NumDot arrays can be indexed and sliced similarly to godot Arrays, but with more
4545
4646
# Slicing
4747
print(arr1.get(nd.range(1, 4))) # Outputs: { 2, 3, 4 }
48-
print(arr2.get(null, 1)) # Outputs: { 2, 4, 6 }
48+
print(arr2.get(&":", 1)) # Outputs: { 2, 4, 6 }
4949
5050
Common Operations
5151
-----------------

docs/how-to-use/math_performance.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ With vectorization, it would execute much, much faster:
4040
4141
var vectors := nd.stack([1000, 2])
4242
var prog := nd.divide(nd.arange(1000), 10)
43-
vectors.set(nd.sin(prog), null, 0)
44-
vectors.set(nd.cos(prog), null, 1)
43+
vectors.set(nd.sin(prog), &":", 0)
44+
vectors.set(nd.cos(prog), &":", 1)
4545
4646
As a rule of thumb: The fewer calls you make to NumDot, the faster your algorithm executes.
4747

docs/how-to-use/numpy-xtensor-numdot.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ NumPy;xtensor;NumDot;Notes
88
| ``a.get_float(0)``";Create a view, or return an element of the tensor.
99
``a[0] = b``;"| ``xt::view(a, { 0 }) = b``
1010
| ``a(0) = b`` ";"| ``a.set(b, 0)``";Update a slice of a tensor.
11-
``a[:]``;``xt::view(a, { xt::all() })``;``a.get(null)``;Select all elements.
12-
``a[None]``;``xt::view(a, { xt::newaxis() })``;"``a.get(&""newaxis"")``";Insert new axis.
11+
``a[:]``;``xt::view(a, { xt::all() })``;``a.get(&":")``;Select all elements.
12+
``a[None]``;``xt::view(a, { xt::newaxis() })``;"``a.get(&""newaxis"")``, ``a.get(null)``";Insert new axis.
1313
``a[..., 0]``;``xt::view(a, { xt::ellipsis(), 0 })``;"``a.get(&""..."", 0)``";Ellipsis stands in for all other dimensions.
1414
``a[2:]``;``xt::view(a, { 2|_ })``;``a.get(nd.from(2))``;Select elements starting at index 2.
1515
``a[:2]``;``xt::view(a, { _|2 })``;``a.get(nd.to(2))``;Select elements ending at index 2.

docs/how-to-use/tensors.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Broadcasting is particularly useful in various scenarios, such as:
6464
# Applying a filter (row-wise operation)
6565
var arr6 := nd.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
6666
var mask := nd.array([1, 0, 1])
67-
var filtered := nd.multiply(arr6, mask.get(null, &"newaxis"))
67+
var filtered := nd.multiply(arr6, mask.get(&":", null))
6868
print(filtered) # Outputs:
6969
# {{1, 2, 3}
7070
# {0, 0, 0}

0 commit comments

Comments
 (0)