Skip to content

Commit 13108f9

Browse files
UranusSevenmergify[bot]aresnow1
authored
DOC: getting started translation (#187)
Signed-off-by: UranusSeven <109661872+UranusSeven@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: aresnow1 <109642806+aresnow1@users.noreply.github.com>
1 parent feb6e83 commit 13108f9

File tree

4 files changed

+197
-141
lines changed

4 files changed

+197
-141
lines changed

doc/source/getting_started/numpy.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,8 @@ Several arrays can be stacked together along different axes::
528528
array([[9., 7., 1., 9.],
529529
[5., 2., 5., 1.]])
530530

531-
The function `column_stack` stacks 1D arrays as columns into a 2D array. It is equivalent to
532-
`hstack` only for 2D arrays::
531+
The function ``column_stack`` stacks 1D arrays as columns into a 2D array. It is equivalent to
532+
``hstack`` only for 2D arrays::
533533

534534
>>> from xorbits.numpy import newaxis
535535
>>> np.column_stack((a, b)) # with 2D arrays
@@ -552,34 +552,34 @@ The function `column_stack` stacks 1D arrays as columns into a 2D array. It is e
552552
array([[4., 3.],
553553
[2., 8.]])
554554

555-
On the other hand, the function `row_stack` is equivalent to `vstack` for any input arrays. In
556-
fact, `row_stack` is an alias for `vstack`::
555+
On the other hand, the function ``row_stack`` is equivalent to ``vstack`` for any input arrays. In
556+
fact, ``row_stack`` is an alias for ``vstack``::
557557

558558
>>> np.column_stack is np.hstack
559559
False
560560
>>> np.row_stack is np.vstack
561561
True
562562

563-
In general, for arrays with more than two dimensions, `hstack` stacks along their second axes,
564-
`vstack` stacks along their first axes, and `concatenate` allows for an optional arguments giving
563+
In general, for arrays with more than two dimensions, ``hstack`` stacks along their second axes,
564+
``vstack`` stacks along their first axes, and ``concatenate`` allows for an optional arguments giving
565565
the number of the axis along which the concatenation should happen.
566566

567567
.. note::
568568

569-
In complex cases, `r_` and `c_` are useful for creating arrays by stacking numbers along one axis.
569+
In complex cases, ``r_`` and ``c_`` are useful for creating arrays by stacking numbers along one axis.
570570
They allow the use of range literals ``:``. ::
571571

572572
>>> np.r_[1:4, 0, 4]
573573
array([1, 2, 3, 0, 4])
574574

575-
When used with arrays as arguments, `r_` and `c_` are similar to `vstack` and `hstack` in their
575+
When used with arrays as arguments, ``r_`` and ``c_`` are similar to ``vstack`` and ``hstack`` in their
576576
default behavior, but allow for an optional argument giving the number of the axis along which to
577577
concatenate.
578578

579579
Splitting one array into several smaller ones
580580
---------------------------------------------
581581

582-
Using `hsplit`, you can split an
582+
Using ``hsplit``, you can split an
583583
array along its horizontal axis, either by specifying the number of
584584
equally shaped arrays to return, or by specifying the columns after
585585
which the division should occur::
@@ -601,6 +601,6 @@ which the division should occur::
601601
[7.]]), array([[0., 5., 4., 0., 6., 8., 5., 2.],
602602
[1., 8., 6., 7., 1., 8., 1., 0.]])]
603603

604-
`vsplit` splits along the vertical
605-
axis, and `array_split` allows
604+
``vsplit`` splits along the vertical
605+
axis, and ``array_split`` allows
606606
one to specify along which axis to split.

doc/source/getting_started/pandas.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Selecting a single column, which yields a :class:`Series`, equivalent to ``df.A`
136136
137137
df['A']
138138
139-
Selecting via ``[]``, which slices the rows.
139+
Selecting via ``[]``, which slices the rows:
140140

141141
.. ipython:: python
142142
:okwarning:

0 commit comments

Comments
 (0)