Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Update help() outputs #38092

Merged
merged 1 commit into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions src/doc/de/tutorial/interactive_shell.rst
Original file line number Diff line number Diff line change
Expand Up @@ -621,15 +621,25 @@ um eine manpage-artige Hilfe zu bekommen.
::

sage: help(VectorSpace)
Help on class VectorSpace ...

class VectorSpace(__builtin__.object)
| Create a Vector Space.
|
| To create an ambient space over a field with given dimension
| using the calling syntax ...
:
:
Help on function VectorSpace in module sage.modules.free_module:

VectorSpace(K, dimension_or_basis_keys=None, sparse=False, inner_product_matrix=None, *,
with_basis='standard', dimension=None, basis_keys=None, **args)
EXAMPLES:

The base can be complicated, as long as it is a field.

::

sage: V = VectorSpace(FractionField(PolynomialRing(ZZ,'x')),3)
sage: V
Vector space of dimension 3 over Fraction Field of Univariate Polynomial Ring in x
over Integer Ring
sage: V.basis()
[
(1, 0, 0),
(0, 1, 0),
--More--

Wenn Sie ``q`` drücken um das Hilfesystem zu verlassen, kommen Sie genau
dahin zurück, wo Sie Ihre Sitzung verlassen haben. Die ``help`` Anzeige
Expand Down
45 changes: 17 additions & 28 deletions src/doc/en/constructions/interface_issues.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,34 +132,23 @@ returns

.. CODE-BLOCK:: text

Help on function Matrix in module sage.matrix.constructor:

Matrix(R, nrows, ncols, entries = 0, sparse = False)
Create a matrix.

INPUT:
R -- ring
nrows -- int; number of rows
ncols -- int; number of columns
entries -- list; entries of the matrix
sparse -- bool (default: False); whether or not to store matrices as sparse
OUTPUT:
a matrix

EXAMPLES:
sage: Matrix(RationalField(), 2, 2, [1,2,3,4])
[1 2]
[3 4]

sage: Matrix(FiniteField(5), 2, 3, range(6))
[0 1 2]
[3 4 0]

sage: Matrix(IntegerRing(), 10, 10, range(100)).parent()
Full MatrixSpace of 10 by 10 dense matrices over Integer Ring

sage: Matrix(IntegerRing(), 10, 10, range(100), sparse = True).parent()
Full MatrixSpace of 10 by 10 sparse matrices over Integer Ring
Help on cython_function_or_method in module sage.matrix.constructor:

matrix(*args, **kwds)
matrix(*args, **kwds)
File: sage/matrix/constructor.pyx (starting at line 21)

Create a matrix.

This implements the ``matrix`` constructor::

sage: matrix([[1,2],[3,4]])
[1 2]
[3 4]

It also contains methods to create special types of matrices, see
``matrix.[tab]`` for more options. For example::
--More--

in a new screen. Type q to return to the Sage screen.

Expand Down
28 changes: 19 additions & 9 deletions src/doc/en/tutorial/interactive_shell.rst
Original file line number Diff line number Diff line change
Expand Up @@ -669,15 +669,25 @@ manpage-like help file about a given class.
::

sage: help(VectorSpace)
Help on class VectorSpace ...

class VectorSpace(__builtin__.object)
| Create a Vector Space.
|
| To create an ambient space over a field with given dimension
| using the calling syntax ...
:
:
Help on function VectorSpace in module sage.modules.free_module:

VectorSpace(K, dimension_or_basis_keys=None, sparse=False, inner_product_matrix=None, *,
with_basis='standard', dimension=None, basis_keys=None, **args)
EXAMPLES:

The base can be complicated, as long as it is a field.

::

sage: V = VectorSpace(FractionField(PolynomialRing(ZZ,'x')),3)
sage: V
Vector space of dimension 3 over Fraction Field of Univariate Polynomial Ring in x
over Integer Ring
sage: V.basis()
[
(1, 0, 0),
(0, 1, 0),
--More--

When you type ``q`` to exit the help system, your session appears
just as it was. The help listing does not clutter up your session,
Expand Down
30 changes: 20 additions & 10 deletions src/doc/fr/tutorial/interactive_shell.rst
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ magiques » :
exemple ``.profile``). La commande ``%edit`` à l'invite de Sage ouvrira
l'éditeur sélectionné. Vous pouvez alors par exemple saisir une définition de
fonction::

def some_function(n):
return n**2 + 3*n + 2

Expand Down Expand Up @@ -679,15 +679,25 @@ classe.
::

sage: help(VectorSpace)
Help on class VectorSpace ...

class VectorSpace(__builtin__.object)
| Create a Vector Space.
|
| To create an ambient space over a field with given dimension
| using the calling syntax ...
:
:
Help on function VectorSpace in module sage.modules.free_module:

VectorSpace(K, dimension_or_basis_keys=None, sparse=False, inner_product_matrix=None, *,
with_basis='standard', dimension=None, basis_keys=None, **args)
EXAMPLES:

The base can be complicated, as long as it is a field.

::

sage: V = VectorSpace(FractionField(PolynomialRing(ZZ,'x')),3)
sage: V
Vector space of dimension 3 over Fraction Field of Univariate Polynomial Ring in x
over Integer Ring
sage: V.basis()
[
(1, 0, 0),
(0, 1, 0),
--More--

Pour quitter la page d'aide, appuyez sur ``q``. Votre session revient à
l'écran comme elle était : contrairement à la sortie de ``fonction?``,
Expand Down
38 changes: 24 additions & 14 deletions src/doc/ja/tutorial/interactive_shell.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ IPythonについてもっと知りたければ、Sageプロンプトで ``?``

Sageセッションのロギングと,セッションの保存(:ref:`section-save` 節を参照)は同じことではない.
入力のログをとるには, ``logstart`` コマンドを使う(オプションで出力のログも可能だ).
詳細については ``logstart?`` と入力してみてほしい.
詳細については ``logstart?`` と入力してみてほしい.
``logstart`` を使えば,全ての入力と出力のログを残し,将来のセッション時に(そのログファイルをリロードしてやるだけで)入力を再生することも可能になる.

.. skip
Expand Down Expand Up @@ -379,11 +379,11 @@ IPythonトリック


IPythonのクイック レファレンスガイドを見たければ, ``%quickref`` と入力する.
執筆時点(2011年4月)ではSageはIPythonのバージョン0.9.1を採用しており, `documentation for its magic commands
執筆時点(2011年4月)ではSageはIPythonのバージョン0.9.1を採用しており, `documentation for its magic commands
<http://ipython.org/ipython-doc/dev/interactive/tutorial.html#magic-functions>`_
はオンラインで読むことができる.
マジックコマンドの,ちょっと進んだ機能群についてはIPythonの `ここ
<http://ipython.org/ipython-doc/stable/interactive/reference.html#magic-command-system>`_
<http://ipython.org/ipython-doc/stable/interactive/reference.html#magic-command-system>`_
で文書化されているのが見つかるはずだ.


Expand Down Expand Up @@ -452,7 +452,7 @@ Sageに戻るには,Ctrl-Dか ``quit`` を入力する.
=================================

*遡行検索*: コマンドの冒頭部を打ち込んでから ``Ctrl-p`` (または上向き矢印キー)を押すと,冒頭部が一致する過去の入力行を全て呼び出すことができる.
この機能は,Sageをいったん終了し再起動してからでも有効である.
この機能は,Sageをいったん終了し再起動してからでも有効である.
``Ctrl-r`` を入力すれば,入力ヒストリを逆方向に検索することも可能だ.
この入力行の検索と再利用機能は全て ``readline`` パッケージを経由しており,ほとんどのLinux系システム上で利用できるはずだ.

Expand Down Expand Up @@ -610,15 +610,25 @@ Sageの特長の一つは,総合的なヘルプ機能の装備である.
::

sage: help(VectorSpace)
Help on class VectorSpace ...
Help on function VectorSpace in module sage.modules.free_module:

class VectorSpace(__builtin__.object)
| Create a Vector Space.
|
| To create an ambient space over a field with given dimension
| using the calling syntax ...
:
:
VectorSpace(K, dimension_or_basis_keys=None, sparse=False, inner_product_matrix=None, *,
with_basis='standard', dimension=None, basis_keys=None, **args)
EXAMPLES:

The base can be complicated, as long as it is a field.

::

sage: V = VectorSpace(FractionField(PolynomialRing(ZZ,'x')),3)
sage: V
Vector space of dimension 3 over Fraction Field of Univariate Polynomial Ring in x
over Integer Ring
sage: V.basis()
[
(1, 0, 0),
(0, 1, 0),
--More--


``q`` と入力してヘルプを終えると,中断前のセッション画面がそのまま復帰する.
Expand Down Expand Up @@ -647,10 +657,10 @@ Sageの特長の一つは,総合的なヘルプ機能の装備である.
..
#. **Save your Game:** Only support saving and loading of complete
sessions (e.g., GAP, Magma).

#. **Unified Input/Output:** Make every object print in a way that
can be read back in (GP/PARI).

#. **Eval**: Make it easy to evaluate arbitrary code in the
interpreter (e.g., Singular, PARI).

Expand Down
Loading
Loading