Skip to content

Commit 5250823

Browse files
committed
minor tweaks
1 parent 91cf4ed commit 5250823

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

docs/source/intro.rst

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ where a vector argument is required.
523523
differences are:
524524
- the use of 1D arrays -- all MATLAB arrays have two dimensions,
525525
even if one of them is equal to one.
526-
- Iterating over a 1D array (N,) returns consecutive elements
526+
- Iterating over a 1D NumPy array (N,) returns consecutive elements
527527
- Iterating over a 2D NumPy array is done by row, not columns as in MATLAB.
528528
- Iterating over a row vector ``(1,N)`` returns the entire row
529529
- Iterating a column vector ``(N,1)`` returns consecutive elements (rows).
@@ -532,11 +532,12 @@ where a vector argument is required.
532532
- Functions that require vector can be passed a list, tuple or numpy.ndarray
533533
for a vector -- described in the documentation as being of type
534534
*array_like*.
535-
- The documentation refers to NumPy arrays succinctly as
535+
- This toolbox documentation refers to NumPy arrays succinctly as:
536+
536537
- ``ndarray(N)`` for a 1D array of length ``N``
537-
- ``ndarray(N,M)`` for a 2D array of dimension $N \times M$.
538+
- ``ndarray(N,M)`` for a 2D array of dimension :math:`N \times M`.
538539

539-
The classes ``SO2``, ```SE2``, ```SO3``, ``SE3``, ``UnitQuaternion`` can operate
540+
The classes ``SO2``, ``SE2``, ``SO3``, ``SE3``, ``UnitQuaternion`` can operate
540541
conveniently on lists but the ``base`` functions do not support this. If you
541542
wish to work with these functions and create lists of pose objects you could
542543
keep the numpy arrays in high-order numpy arrays (ie. add an extra dimensions),
@@ -546,16 +547,17 @@ or keep them in a list, tuple or any other Python container described in the
546547
Let's show a simple example:
547548

548549
.. runblock:: pycon
549-
:linenos:
550+
:linenos:
550551

551-
>>> from roboticstoolbox.base import *
552-
>>> rotx(0.3)
553-
>>> rotx(30, unit='deg')
554-
>>> R = rotx(0.3) @ roty(0.2)
552+
>>> from spatialmath.base import *
553+
>>> rotx(0.3)
554+
>>> rotx(30, unit='deg')
555+
>>> R = rotx(0.3) @ roty(0.2)
556+
>>> R
555557

556558
At line 1 we import all the base functions into the current namespace. In line
557-
12 when we multiply the matrices we need to use the `@` operator to perform
558-
matrix multiplication. The `*` operator performs element-wise multiplication,
559+
10 when we multiply the matrices we need to use the ``@`` operator to perform
560+
matrix multiplication. The ``*`` operator performs element-wise multiplication,
559561
which is equivalent to the MATLAB ``.*`` operator.
560562

561563
We also support multiple ways of passing vector information to functions that require it:

0 commit comments

Comments
 (0)